mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-26 07:16:09 +03:00
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
|
name: build_prerelease
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
|
||
|
jobs:
|
||
|
BuildPreRelease:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout Repository
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
submodules: recursive
|
||
|
|
||
|
- name: Setup Java
|
||
|
uses: actions/setup-java@v3
|
||
|
with:
|
||
|
distribution: 'zulu'
|
||
|
java-version: 17
|
||
|
|
||
|
- name: Setup Go
|
||
|
uses: actions/setup-go@v3
|
||
|
with:
|
||
|
go-version: 1.18
|
||
|
|
||
|
- uses: actions/cache@v3
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cache/go-build
|
||
|
~/go/pkg/mod
|
||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-go-
|
||
|
|
||
|
- name: PreRelease Build
|
||
|
if: success()
|
||
|
uses: gradle/gradle-build-action@v2
|
||
|
with:
|
||
|
arguments: --no-daemon app:assembleMeta-AlphaRelease
|
||
|
|
||
|
- name: Delete current release assets
|
||
|
uses: andreaswilli/delete-release-assets-action@v2.0.0
|
||
|
with:
|
||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||
|
tag: Prerelease-${{ github.ref_name }}
|
||
|
deleteOnlyFromDrafts: false
|
||
|
- name: Tag Repo
|
||
|
uses: richardsimko/update-tag@v1
|
||
|
with:
|
||
|
tag_name: Prerelease-${{ github.ref_name }}
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
|
||
|
- name: Upload Alpha
|
||
|
uses: softprops/action-gh-release@v1
|
||
|
if: ${{ success() }}
|
||
|
with:
|
||
|
tag: ${{ github.ref_name }}
|
||
|
tag_name: Prerelease-${{ github.ref_name }}
|
||
|
files: app/build/outputs/apk/foss/release/*
|
||
|
prerelease: true
|
||
|
generate_release_notes: true
|