feat: assets #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flutter CI | |
on: | |
workflow_dispatch: | |
inputs: | |
TAG: | |
description: 'Set a Tag' | |
required: true | |
default: '' | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17.x' | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Build apks | |
run: | | |
flutter pub get | |
flutter build apk --dart-define=GITHUB_HASH=$GITHUB_SHA --release | |
flutter build apk --dart-define=GITHUB_HASH=$GITHUB_SHA --target-platform android-arm,android-arm64,android-x64 --split-per-abi --release | |
mkdir -p releases | |
mv -f build/app/outputs/flutter-apk/*-release.apk releases | |
mv -f releases/app-release.apk releases/app-universal-release.apk | |
- name: Release to github | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "releases/*-release.apk" | |
tag: ${{ github.event.inputs.TAG }} |