Upgrade and removed unused dependencies. Migrated room kapt to ksp. #31
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 Signed Release | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'dev' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: set up JDK 18 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '18' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Decode Keystore | |
id: decode_keystore | |
uses: timheuer/base64-to-file@v1.2 | |
with: | |
fileName: 'android_keystore.jks' | |
encodedString: ${{ secrets.KEYSTORE }} | |
- name: Decode Google Services Info | |
uses: timheuer/base64-to-file@v1.2 | |
with: | |
fileName: 'google-services.json' | |
fileDir: '.' | |
encodedString: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
- name: Set snapshot | |
run: | | |
echo "IS_SNAPSHOT=true" >> "$GITHUB_ENV" | |
if: github.ref == 'refs/heads/dev' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build APK and app bundle | |
run: ./gradlew bundleRelease assembleRelease | |
env: | |
RELEASE_STORE_FILE: ${{ steps.decode_keystore.outputs.filePath }} | |
RELEASE_STORE_PASSWORD : ${{ secrets.RELEASE_STORE_PASSWORD }} | |
RELEASE_KEY_ALIAS : ${{ secrets.RELEASE_KEY_ALIAS }} | |
RELEASE_KEY_PASSWORD : ${{ secrets.RELEASE_KEY_PASSWORD }} | |
BUILD_NUMBER: ${{ github.run_number }} | |
- name: Upload crashlytics symbols | |
run: ./gradlew uploadCrashlyticsSymbolFileRelease | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: AppBundle | |
path: build/outputs/bundle/release/* | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: APK | |
path: build/outputs/apk/release/* | |
- name: Set version variables | |
run: | | |
VER=$(cat version.txt) | |
echo "VERSION=$VER" >> $GITHUB_ENV | |
- name: Create/Update Github Snapshot Release | |
uses: mini-bomba/create-github-release@v1.1.3 | |
if: github.ref == 'refs/heads/dev' | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ env.VERSION }} | |
body: 'Snapshot release' | |
files: | | |
build/outputs/apk/release/*.apk | |
README.md | |
clear_attachments: true | |
prerelease: true | |
name: ${{ env.VERSION }} | |
- name: Publish Snapshot to Play Store | |
uses: swootte/upload-google-play@V1.1.5 | |
if: github.ref == 'refs/heads/dev' | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
packageName: uk.co.armedpineapple.cth | |
releaseFiles: build/outputs/bundle/release/*.aab | |
track: alpha | |
status: completed | |
whatsNewDirectory: distribution/snapshot | |
changesNotSentForReview: false |