Refactor Android CI workflow for clarity and consistency #2
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: Build | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - master | |
| pull_request: | |
| branches: | |
| - dev | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get current date | |
| id: date | |
| run: echo "::set-output name=date::$(date +'%Y.%m.%d')" | |
| - name: Clone repository | |
| uses: actions/checkout@v2 | |
| - name: Build bootstrap | |
| run: | | |
| bash build_bootstrap.sh | |
| - name: Prepare Keystore | |
| run: | | |
| echo "${{ secrets.KEYSTORE }}" > tel.jks.asc | |
| echo "${{ secrets.KEYSTORE_PASS }}" | gpg -d --passphrase-fd 0 --batch tel.jks.asc > app/tel.jks | |
| echo "${{ secrets.KEYSTORE_PROP }}" > keystore.properties.asc | |
| gpg -d --passphrase "${{ secrets.KEYSTORE_PROP_PASS }}" --batch keystore.properties.asc > app/keystore.properties | |
| - name: Build | |
| run: | | |
| ./gradlew :app:assembleRelease | |
| - name: Rename | |
| run: | | |
| mv app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk TEL-arm64.apk | |
| mv app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk TEL-armeabi.apk | |
| mv app/build/outputs/apk/release/app-x86-release-unsigned.apk TEL-x86.apk | |
| mv app/build/outputs/apk/release/app-x86_64-release-unsigned.apk TEL-x86_x64.apk | |
| - name: Release | |
| uses: "marvinpinto/action-automatic-releases@latest" | |
| with: | |
| repo_token: "${{ secrets.TOKEN }}" | |
| automatic_release_tag: "stable" | |
| prerelease: false | |
| title: "TEL-${{ steps.date.outputs.date }}" | |
| files: | | |
| *.apk |