revanced-manager/.github/workflows/build_pull_request.yml
oSumAtrIX 062f28387f
ci: Modernize workflows (#2473)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2025-04-10 23:47:26 +07:00

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