Skip to content

Commit

Permalink
Create android-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrokz committed Apr 11, 2022
1 parent 533f570 commit 29b72b5
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Ani Mobile Android Release

on:
push:
branches: [master]

jobs:
version:
name: Create version number
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --depth=10000
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.6
with:
versionSpec: '5.x'
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.6
- name: Create version.txt with nuGetVersion
run: echo ${{ steps.gitversion.outputs.nuGetVersion }} > version.txt
- name: Upload version.txt
uses: actions/upload-artifact@v2
with:
name: gitversion
path: version.txt

build:
name: Build APK and Create release
needs: [ version ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.10.1'
- name: Get version.txt
uses: actions/download-artifact@v2
with:
name: gitversion
- name: Read version
id: version
uses: juliangruber/read-file-action@v1
with:
path: version.txt
- run: flutter pub get
# - run: flutter test
- run: flutter build apk --release --split-per-abi
- run: flutter build appbundle
- name: Create a Release in GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*.apk,build/app/outputs/bundle/release/app-release.aab"
token: ${{ secrets.GH_TOKEN }}
tag: ${{ steps.version.outputs.content }}
commit: ${{ github.sha }}

0 comments on commit 29b72b5

Please sign in to comment.