Merge branch 'master' of https://github.com/AhsanSarwar45/clock #22
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: Android Release | |
# 1 | |
on: | |
# 2 | |
push: | |
tags: | |
- '*' | |
# 3 | |
workflow_dispatch: | |
# 4 | |
jobs: | |
# 5 | |
build: | |
# 6 | |
runs-on: ubuntu-latest | |
permissions: write-all | |
# 7 | |
steps: | |
# 8 | |
- uses: actions/checkout@v3 | |
# 9 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: "17" | |
cache: 'gradle' | |
# 10 | |
- uses: subosito/flutter-action@v2 | |
with: | |
# 11 | |
flutter-version: "3.16.3" | |
channel: 'stable' | |
cache: true | |
# - name: Decode android/neumodore_key.jks | |
# run: echo "${{ secrets.KEYSTORE_JKS_PROD }}" | base64 --decode > android/keystore.jks | |
# - name: Decode android/key.properties | |
# run: echo "${{ secrets.KEY_PROPERTIES_PROD }}" | base64 --decode > android/key.properties | |
- uses: olegtarasov/get-tag@v2 # that generate $GIT_TAG_NAME env | |
id: tagName | |
with: | |
tagRegex: 'internal-v([0-9]+.[0-9]+.[0-9]+\+[0-9]+)' # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined. | |
tagRegexGroup: 1 # Optional. Default is 1. | |
- name: Replace YAML version with tag version | |
run: | | |
sed -i 's/99.99.99+99/'$GIT_TAG_NAME'/g' pubspec.yaml| | |
echo "Tag used version:"$GIT_TAG_NAME | |
- name: Pub Get Packages | |
run: flutter pub get | |
- name: Build APPBUNDLE | |
run: flutter build appbundle | |
- name: Build APK | |
run: flutter build apk --split-per-abi | |
- name: Create Github Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/app/outputs/bundle/release/*.aab,build/app/outputs/flutter-apk/*.apk" | |
# tag: $GIT_TAG_NAME | |
# token: ${{ secrets.PERSONAL_RELEASE_TOKEN }} | |
- name: Save APPBUNDLE to Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: APPBUNDLE | |
path: build/app/outputs/bundle/release/app-release.aab | |