fix signed artifact release #13
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: Android CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
paths-ignore: [ "/app/src/main/res/values-*/strings.xml" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Upload artifact debug APK | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: mset9installer-artifact-debug.apk | |
path: app/build/outputs/apk/artifact/debug/app-artifact-debug.apk | |
- name: Upload artifact unsigned release APK | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: mset9installer-artifact-release-unsigned.apk | |
path: app/build/outputs/apk/artifact/release/app-artifact-release-unsigned.apk | |
- name: Sign artifact release APK | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: app/build/outputs/apk/artifact/release | |
signingKeyBase64: ${{ secrets.KEYSTORE }} | |
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
alias: ${{ secrets.APP_NAME_KEY }} | |
keyPassword: ${{ secrets.APP_NAME_KEY_PASSWORD }} | |
- name: Rename artifact signed release APK | |
run: mv app/build/outputs/apk/artifact/release/app-artifact-release-unsigned-aligned.apk app/build/outputs/apk/artifact/release/app-artifact-release.apk | |
- name: Upload artifact signed release APK | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: mset9installer-artifact-release.apk | |
path: app/build/outputs/apk/artifact/release/app-artifact-release.apk |