Release Build #8
This file contains hidden or 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: Release Build | |
| on: | |
| push: | |
| tags: | |
| - 'release*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Create Google Services JSON File | |
| env: | |
| GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
| run: | | |
| echo "$GOOGLE_SERVICES_JSON" > google-services.json.b64 | |
| base64 -d -i google-services.json.b64 > ./app/google-services.json | |
| - name: Create LocalProperites | |
| run: | | |
| echo GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }} >> ./local.properties | |
| echo TUK_BASE_URL=${{ secrets.TUK_BASE_URL }} >> ./local.properties | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build apk | |
| run: ./gradlew bundleProductionRelease | |
| - name: Sign App Bundle | |
| uses: r0adkll/sign-android-release@v1 | |
| # ID used to access action output | |
| id: sign_app | |
| with: | |
| releaseDirectory: app/build/outputs/bundle/productionRelease/ | |
| signingKeyBase64: ${{ secrets.KEYSTORE_BASE64 }} | |
| alias: ${{ secrets.KEYSTORE_ALIAS }} | |
| keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
| keyPassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
| env: | |
| # override default build-tools version (29.0.3) -- optional | |
| BUILD_TOOLS_VERSION: "34.0.0" | |
| - name: Upload .aab as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-bundle | |
| path: ${{steps.sign_app.outputs.signedReleaseFile}} |