revanced-manager/.github/workflows/pull-request-build.yml

42 lines
1.3 KiB
YAML
Raw Normal View History

2022-11-26 19:16:29 +01:00
name: "Android CI PR Build"
on:
2022-11-26 19:16:29 +01:00
pull_request:
branches:
2022-11-26 19:16:29 +01:00
- "**"
jobs:
2022-08-19 00:25:47 +02:00
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2022-11-26 19:16:29 +01:00
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 12
uses: actions/setup-java@v3
with:
java-version: '12'
distribution: 'zulu'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
2022-11-23 22:27:00 +01:00
- name: Set environment variables
run: echo $SECRETS | base64 -d > lib/utils/environment.dart
env:
SECRETS: ${{ secrets.SECRETS }}
- name: Set up Flutter
run: flutter pub get
- name: Generate files with Builder
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Build with Flutter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2022-11-26 19:16:29 +01:00
run: flutter build apk
- name: Add version to APK
2022-11-26 19:16:29 +01:00
run: mv build/app/outputs/flutter-apk/app-release.apk revanced-manager-${{ env.RELEASE_VERSION }}.apk
- name: Upload APK
uses: actions/upload-artifact@v3
with:
2022-11-26 19:16:29 +01:00
name: revanced-manager-${{ env.RELEASE_VERSION }}
path: revanced-manager-${{ env.RELEASE_VERSION }}.apk