Upgrade sdks #26
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: Build and Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
apk: | |
name: Generate APK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup JDK | |
uses: actions/[email protected] | |
with: | |
distribution: temurin | |
java-version: "17" | |
- name: Set execution flag for gradlew | |
run: chmod +x gradlew | |
- name: Run common unit tests | |
run: bash ./gradlew :common:cleanDesktopTest :common:desktopTest | |
- name: Build Release AAB | |
id: buildRelease | |
run: ./gradlew bundleRelease | |
- name: Sign AAB | |
id: sign | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: android/build/outputs/bundle/release | |
signingKeyBase64: ${{ secrets.KEYSTORE_B64 }} | |
alias: ${{ secrets.KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
- name: Upload AAB to Play Store | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
packageName: com.inspiredandroid.linuxcommandbibliotheca | |
releaseFiles: android/build/outputs/bundle/release/android-release.aab | |
track: beta | |
status: draft | |
mappingFile: android/build/outputs/mapping/release/mapping.txt | |
- name: Build APK | |
run: bash ./gradlew assembleRelease --stacktrace | |
- name: Sign APK | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: android/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.KEYSTORE_B64 }} | |
alias: ${{ secrets.KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
- name: Upload APK | |
uses: actions/upload-artifact@v1 | |
with: | |
name: apk | |
path: android/build/outputs/apk/release/android-release-unsigned-signed.apk | |
- name: Build cli JAR | |
run: bash ./gradlew :cli:buildJar | |
- name: Upload cli JAR | |
uses: actions/upload-artifact@v1 | |
with: | |
name: jar | |
path: cli/out/linuxcommandlibrary.jar | |
release: | |
name: Release APK and JAR | |
needs: apk | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download APK from build | |
uses: actions/download-artifact@v1 | |
with: | |
name: apk | |
- name: Download JAR from build | |
uses: actions/download-artifact@v1 | |
with: | |
name: jar | |
- name: Create Github Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
- name: Upload Github Release APK | |
id: upload_release_asset | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: apk/android-release-unsigned-signed.apk | |
asset_name: ${{ github.event.repository.name }}.apk | |
asset_content_type: application/zip | |
- name: Upload Github Release cli JAR | |
id: upload_release_asset2 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: jar/linuxcommandlibrary.jar | |
asset_name: linuxcommandlibrary.jar | |
asset_content_type: application/zip |