build: set absolute path for key path #15
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: Release APK | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
Gradle: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
- name: setup jdk | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Load keystore | |
run: | | |
echo "${{ secrets.KEYSTORE_FILE_CONTENTS }}" | base64 -d > keystore.jks && \ | |
cat <<EOL > local.properties | |
storeFilePath=$PWD/keystore.jks | |
storePassword=${{ secrets.RELEASE_STORE_PASSWORD }} | |
keyAlias=${{ secrets.RELEASE_KEY_ALIAS }} | |
keyPassword=${{ secrets.RELEASE_KEY_PASSWORD }} | |
EOL | |
- name: Build Release APK | |
run: ./gradlew assembleRelease | |
env: | |
GRADLE_USER_HOME: ./gradle-config | |
- name: Set current directory as a safe repository | |
run: git config --global --add safe.directory /github/workspace | |
- uses: ButterCam/setup-github-cli@master | |
- name: Release using github cli | |
run: gh release create ${GITHUB_REF##*/} ./app/build/outputs/apk/release/**.apk | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} |