Merge pull request #64 from omer358/dev #12
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: [ "main" ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
cache: gradle | ||
- name: Set environment variables | ||
run: | | ||
echo "REMEMBER_ME_KEY_PASSWORD=${{ secrets.REMEMBER_ME_KEY_PASSWORD }}" >> $GITHUB_ENV | ||
echo "REMEMBER_ME_KEYSTORE_PASSWORD=${{ secrets.REMEMBER_ME_KEYSTORE_PASSWORD }}" >> $GITHUB_ENV | ||
echo "REMEMBER_ME_KEYSTORE_ALIAS=${{ secrets.REMEMBER_ME_KEYSTORE_ALIAS }}" >> $GITHUB_ENV | ||
- name: Set GPG_TTY environment variable | ||
run: echo "export GPG_TTY=true" >> $GITHUB_ENV | ||
- name: Decrypt Keystore File | ||
env: | ||
RELEASE_KEYSTORE_PHRASE: ${{ secrets.RELEASE_KEYSTORE_PHRASE }} | ||
RELEASE_KEYSTORE_FILE: ${{ secrets.REMEMBER_RELEASE_KEYSTORE }} | ||
run: | | ||
mkdir keys | ||
echo "$RELEASE_KEYSTORE_FILE" > keys/keystore.jks.asc | ||
echo "$RELEASE_KEYSTORE_PHRASE" > keys/keystore_passphrase.txt | ||
gpg -d --passphrase-file=keys/keystore_passphrase.txt --batch keys/keystore.jks.asc > keys/keystore.jks | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
env: | ||
KEYPASSWORD: ${{ secrets.REMEMBER_ME_KEY_PASSWORD }} | ||
STOREPASSWORD: ${{ secrets.REMEMBER_ME_KEY_STORE_PASSWORD }} | ||
KEYALIAS: ${{ secrets.REMEMBER_ME_KEYSTORE_ALIAS } | ||
Check failure on line 57 in .github/workflows/build_and_deploy_apk.yml GitHub Actions / Android CIInvalid workflow file
|
||
run: ./gradlew build | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: app/build/outputs/apk/release/*.apk | ||