ClashMetaForAndroid/.github/workflows/build-pre-release.yaml

85 lines
2.4 KiB
YAML
Raw Permalink Normal View History

Update Meta Core to v1.16.0 and add actions to help maintain the project (#147) * add: Create dependabot.yml * chore: Create update-dependencies.yml * chore: Update update-dependencies.yml * fix: switch meta core upstream * chore: Update update-dependencies.yml * chore: Update update-dependencies.yml * chore: Update update-dependencies.yml * chore: Update build-unsigned.yaml * chore: Delete .github/dependabot.yml * chore: Run build-unsigned for each PR * chore: Better PR info and add repo dispatch listener * chore: Better actions name * chore: rename ci file and try to fix failure * chore: add manual auto project version bump * chore: Fix wrong command usage * chore: fix path * chore: Fix * chore: Fix bump project version * chore: can this pass compile? * chore: update core to newest alpha * Update update-dependencies.yaml * chore: try to change core upstream * chore: remove all go get update to pass compile * Revert "chore: remove all go get update to pass compile" This reverts commit aad0ec3b83b51062c877f0487cb55f4ae7c3e617. * Revert "chore: can this pass compile?" This reverts commit 635289639b199d28d3d865849e5e7b7595f51522. * chore: force update submodule * chore: change upstream to alpha * chore: remove rubbish * chore: change upstream and update core * chore: add version fixed packages * chore: small fix * chore: update go dependencies * chore: revert some depends to old versions to fix compile * fix: fix compile error caused by core's deprecation * chore: fix actions and update core * chore: update clash core * fix: fix block calling * chore: update app version * chore: small fix to actions * feat: add Hysteria2 for UI * chore: revert version update for actions test * chore: try recover main go mod upgrade * chore: fix tag logic in release actions * Bump version to 2.8.10 (208010) * chore: remove test code in actions --------- Co-authored-by: GitHub Action <action@github.com>
2023-10-22 10:57:35 +03:00
name: Build Pre-Release
2022-06-16 10:24:43 +03:00
on:
workflow_dispatch:
2024-04-20 06:01:04 +03:00
pull_request:
branches: [main]
types: [closed]
2022-06-16 10:24:43 +03:00
jobs:
BuildPreRelease:
2024-04-20 06:01:04 +03:00
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
2022-06-16 10:24:43 +03:00
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
2022-06-18 08:21:23 +03:00
- name: Checkout submodules
2023-10-26 16:20:21 +03:00
run: git submodule update --init --recursive --remote --force
2022-06-16 10:24:43 +03:00
- name: Setup Java
uses: actions/setup-java@v4
2022-06-16 10:24:43 +03:00
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
2022-06-16 10:24:43 +03:00
- name: Setup Go
uses: actions/setup-go@v5
2022-06-16 10:24:43 +03:00
with:
2024-08-15 08:39:12 +03:00
go-version: "1.23"
2022-06-16 10:24:43 +03:00
- uses: actions/cache@v4
2022-06-16 10:24:43 +03:00
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
2022-06-18 03:16:17 +03:00
- name: Signing properties
env:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: |
touch signing.properties
echo keystore.password="$SIGNING_STORE_PASSWORD" > signing.properties
echo key.alias="$SIGNING_KEY_ALIAS" >> signing.properties
echo key.password="$SIGNING_KEY_PASSWORD" >> signing.properties
echo "cat signing.properties"
cat signing.properties
- name: Pre-release Build
2022-06-16 10:24:43 +03:00
if: success()
2024-09-12 05:53:54 +03:00
run: ./gradlew --no-daemon app:assembleAlphaRelease
2022-06-16 10:24:43 +03:00
2023-11-02 20:54:56 +03:00
# Delete old Prerelease-alpha
2024-04-20 08:21:55 +03:00
- uses: dev-drprasad/delete-tag-and-release@v1.1
2022-06-16 10:24:43 +03:00
with:
2023-11-02 20:54:56 +03:00
tag_name: Prerelease-alpha
2022-06-16 10:24:43 +03:00
github_token: ${{ secrets.GITHUB_TOKEN }}
2023-11-02 20:54:56 +03:00
delete_release: true
2022-06-18 03:16:17 +03:00
2022-06-16 10:24:43 +03:00
- name: Tag Repo
uses: richardsimko/update-tag@v1
with:
2022-06-18 07:49:23 +03:00
tag_name: Prerelease-alpha
2022-06-16 10:24:43 +03:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Alpha
2024-04-20 08:21:55 +03:00
uses: softprops/action-gh-release@v2
2022-06-16 10:24:43 +03:00
if: ${{ success() }}
with:
2022-06-18 07:49:23 +03:00
tag_name: Prerelease-alpha
2024-09-12 05:53:54 +03:00
files: app/build/outputs/apk/alpha/release/*
2022-06-16 10:24:43 +03:00
prerelease: true
generate_release_notes: true
2023-02-09 11:30:15 +03:00
- name: Release Changelog Builder
2024-04-20 08:21:55 +03:00
uses: mikepenz/release-changelog-builder-action@v4