mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-19 21:17:05 +02:00
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
name: Build pull request
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
pr-number:
|
|
description: PR number
|
|
required: true
|
|
app-flavor:
|
|
description: App flavor
|
|
default: release
|
|
type: choice
|
|
options:
|
|
- release
|
|
- debug
|
|
- profile
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
steps:
|
|
- name: Checkout PR
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: refs/pull/${{ inputs.pr-number }}/merge
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Generate translations
|
|
run: dart run slang
|
|
|
|
- name: Generate code files
|
|
run: dart run build_runner build --delete-conflicting-outputs
|
|
|
|
- name: Build
|
|
id: flutter-build
|
|
run: flutter build apk --${{ inputs.app-flavor }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload artifacts
|
|
if: steps.flutter-build.outcome == 'success'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: revanced-manager-(${{ env.COMMIT_HASH }}
|
|
path: |
|
|
build/app/outputs/flutter-apk/app-*.apk
|