update dependencies #1
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, develop, alpha ] | |
pull_request: | |
branches: [ master, develop, alpha ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Write key | |
run: | | |
if [ ! -z "${{ secrets.SIGNING_KEY }}" ]; then | |
echo STORE_PASSWORD='${{ secrets.KEY_STORE_PASSWORD }}' >> local.properties | |
echo KEY_ALIAS='${{ secrets.ALIAS }}' >> local.properties | |
echo KEY_PASSWORD='${{ secrets.KEY_PASSWORD }}' >> local.properties | |
echo STORE_FILE_PATH='../release.keystore' >> local.properties | |
echo ${{ secrets.SIGNING_KEY }} | base64 --decode > release.keystore | |
fi | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew assemble | |
- name: Collect artifcat name | |
run: | | |
echo "debug_artifact=$(basename -s .apk app/build/outputs/apk/debug/*.apk)" >> $GITHUB_ENV | |
echo "release_artifact=$(basename -s .apk app/build/outputs/apk/release/*.apk)" >> $GITHUB_ENV | |
- name: Upload Debug | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.debug_artifact }} | |
path: app/build/outputs/apk/debug/*.apk | |
- name: Upload Release | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.release_artifact }} | |
path: app/build/outputs/apk/release/*.apk |