building apk via yaml #52
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
on: | |
push: | |
branches: | |
- production | |
- beta | |
- alpha | |
- internal | |
name: "Build & Release" | |
jobs: | |
build: | |
name: Build & Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' # See 'Supported distributions' for available options | |
java-version: '11' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.22.2' | |
- name: Decode android/app/keystore.jks | |
run: echo "${{ secrets.KEYSTORE_JKS }}" | base64 --decode > android/app/keystore.jks | |
- name: Decode android/key.properties | |
run: echo "${{ secrets.KEY_PROPERTIES }}" | base64 --decode > android/key.properties | |
- run: flutter pub get | |
- run: flutter build apk --build-number=${{ github.run_number }} --build-name=2024.02.${{ github.run_number }} --obfuscate --split-debug-info=./build/app/outputs/symbols | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
body: 'New apk' | |
name: ${{ github.ref_name }} | |
tag_name: ${{ github.ref_name }} | |
files: build/app/outputs/apk/release/app-release.apk | |
# - uses: r0adkll/upload-google-play@v1.1.3 | |
# with: | |
# serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
# packageName: com.kateile.stg.tz | |
# releaseFiles: build/app/outputs/bundle/release/*.aab | |
# track: ${{ github.ref_name }} | |
# inAppUpdatePriority: 2 | |
# changesNotSentForReview: true | |
# whatsNewDirectory: whatsnew | |
# mappingFile: build/app/outputs/mapping/release/mapping.txt |