version bump #47
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
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: oracle | |
- name: Build the APK | |
run: ./gradlew assRU | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apk | |
path: app/build/outputs/apk/releaseUnsigned/app-releaseUnsigned-unsigned.apk | |
- name: Build the APP Bundle | |
run: ./gradlew app:bundleReleaseUnsigned | |
- name: Debug | |
run: | | |
ls -l app/build/outputs/bundle/ | |
ls -l app/build/outputs/bundle/releaseUnsigned | |
- name: Upload APP Bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundle | |
path: app/build/outputs/bundle/releaseUnsigned/app-releaseUnsigned.aab | |
release: | |
name: Release APK | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prepare release folder | |
run: mkdir -p release | |
- name: Download APK from build | |
uses: actions/[email protected] # This version also unzips the content | |
with: | |
name: apk | |
path: ./release | |
- name: Download Bundle from build | |
uses: actions/[email protected] # This version also unzips the content | |
with: | |
name: bundle | |
path: ./release | |
- name: Debug | |
run: ls -l ./release | |
- name: Setup build tool version variable | |
shell: bash | |
run: | | |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) | |
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV | |
echo Last build tool version is: $BUILD_TOOL_VERSION | |
- uses: r0adkll/sign-android-release@v1 | |
name: Sign app AAB | |
id: sign_app | |
with: | |
releaseDirectory: ./release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
prerelease: false | |
draft: false | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
- name: Upload Release APK | |
id: upload_release_apk | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release/app-releaseUnsigned-unsigned-signed.apk | |
asset_name: MerossPairer.apk | |
asset_content_type: application/zip | |
- name: Upload Release AAB | |
id: upload_release_aab | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release/app-releaseUnsigned.aab | |
asset_name: MerossPairer.aab | |
asset_content_type: application/zip |