2022-08-18 23:25:24 +02:00
|
|
|
name: "Release Build"
|
2022-08-01 13:38:02 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-08-18 23:25:24 +02:00
|
|
|
tags:
|
|
|
|
- "v*"
|
2022-08-01 13:38:02 +02:00
|
|
|
|
|
|
|
jobs:
|
2022-08-19 00:25:47 +02:00
|
|
|
release:
|
2022-08-01 13:38:02 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-11-26 14:34:14 +01:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-14 13:27:56 +02:00
|
|
|
- name: Set env
|
|
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
2022-08-06 23:36:02 +02:00
|
|
|
- name: Set up JDK 12
|
2022-11-26 14:34:14 +01:00
|
|
|
uses: actions/setup-java@v3
|
2022-08-01 13:38:02 +02:00
|
|
|
with:
|
2022-11-26 14:34:14 +01:00
|
|
|
java-version: '12'
|
|
|
|
distribution: 'zulu'
|
|
|
|
- uses: subosito/flutter-action@v2
|
2022-08-01 13:38:02 +02:00
|
|
|
with:
|
2022-08-01 13:43:39 +02:00
|
|
|
channel: 'stable'
|
2022-08-06 23:36:02 +02:00
|
|
|
- name: Set up Flutter
|
|
|
|
run: flutter pub get
|
2022-08-16 15:06:56 +02:00
|
|
|
- name: Generate files with Builder
|
|
|
|
run: flutter packages pub run build_runner build --delete-conflicting-outputs
|
2022-08-06 23:36:02 +02:00
|
|
|
- name: Build with Flutter
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-09-14 17:35:17 +02:00
|
|
|
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
|
|
|
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
|
|
|
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
|
2022-08-06 23:36:02 +02:00
|
|
|
run: flutter build apk
|
2022-09-14 17:35:17 +02:00
|
|
|
- name: Sign APK
|
|
|
|
id: sign_apk
|
2022-11-26 14:34:14 +01:00
|
|
|
uses: ilharp/sign-android-release@v1
|
2022-09-14 17:35:17 +02:00
|
|
|
with:
|
2022-11-26 14:34:14 +01:00
|
|
|
releaseDir: build/app/outputs/apk/release
|
|
|
|
signingKey: ${{ secrets.SIGNING_KEYSTORE }}
|
2022-09-14 17:35:17 +02:00
|
|
|
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
|
2022-11-26 14:34:14 +01:00
|
|
|
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
|
2022-09-14 17:35:17 +02:00
|
|
|
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
2022-08-18 23:25:24 +02:00
|
|
|
- name: Add version to APK
|
2022-11-26 20:14:42 +01:00
|
|
|
run: mv ${{steps.sign_apk.outputs.signedFile}} revanced-manager-${{ env.RELEASE_VERSION }}.apk
|
2022-08-18 23:25:24 +02:00
|
|
|
- name: Publish release APK
|
|
|
|
uses: "marvinpinto/action-automatic-releases@latest"
|
2022-08-01 13:38:02 +02:00
|
|
|
with:
|
2022-08-18 23:25:24 +02:00
|
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
prerelease: false
|
2022-09-14 13:27:56 +02:00
|
|
|
files: revanced-manager-${{ env.RELEASE_VERSION }}.apk
|