Skip to content

Update release-build.yml #30

Update release-build.yml

Update release-build.yml #30

Workflow file for this run

name: "Release Build"
on:
workflow_dispatch:
push:
branches:
- main
- dev
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Cache Node modules
uses: actions/cache@v3
with:
path: |
node_modules
key: npm-${{ hashFiles('package-lock.json') }}
- name: Setup semantic-release
run: npm install
- name: Bump version code
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --extends ./.releaserc.bump.json
- name: Set env
run: echo "RELEASE_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Set up Flutter
run: flutter pub get
- name: Generate files with Builder
run: dart run build_runner build --delete-conflicting-outputs
- name: Build with Flutter
run: flutter build apk
- name: Rename APK
run: mv ${{steps.sign_apk.outputs.signedFile}} revanced-manager-${{ env.RELEASE_VERSION }}.apk
- name: Publish release APK
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --extends ./.releaserc.release.json