-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0147ff
commit c1d0d03
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build and Release APKs | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Create tag | ||
id: tag | ||
uses: jacopo1395/action-autotag@master | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Display tag name | ||
run: echo ${{ steps.tag.outputs.tagname }} | ||
- name: Display tag sha | ||
run: echo ${{ steps.tag.outputs.tagsha }} | ||
- name: Display tag uri | ||
run: echo ${{ steps.tag.outputs.taguri }} | ||
- name: Display version from pubspec.yaml | ||
run: echo ${{ steps.tag.outputs.version }} | ||
|
||
- name: Setup Java JDK | ||
if: ${{ steps.tag.outputs.tagname }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: "8.x" | ||
|
||
- name: Setup Flutter action | ||
if: ${{ steps.tag.outputs.tagname }} | ||
uses: subosito/flutter-action@v1 | ||
with: | ||
flutter-version: "2.2.x" | ||
|
||
- name: Flutter pub get | ||
if: ${{ steps.tag.outputs.tagname }} | ||
run: flutter pub get | ||
|
||
- name: Flutter build split apk releases | ||
if: ${{ steps.tag.outputs.tagname }} | ||
run: flutter build apk --release --split-per-abi | ||
|
||
- name: Move apks to github releases | ||
if: ${{ steps.tag.outputs.tagname }} | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "build/app/outputs/apk/release/*.apk" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit: main | ||
tag: ${{ steps.tag.outputs.version }} | ||
body: ${{ github.event.head_commit.message }} | ||
continue-on-error: true |