57 lines
2.0 KiB
YAML
57 lines
2.0 KiB
YAML
name: CD
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Slow, but needed to workaround https://github.com/actions/checkout/issues/1471.
|
|
fetch-tags: true
|
|
|
|
- name: Decode Keystore
|
|
env:
|
|
KEYSTORE_BASE64: ${{ secrets.RELEASE_KEY_STORE }}
|
|
run: |
|
|
echo $KEYSTORE_BASE64 | base64 -di > app-android-journal3/release_signing.jks
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'adopt'
|
|
cache: gradle
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build with Gradle and SonarCloud
|
|
env:
|
|
SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }}
|
|
RELEASE_KEY_STORE: ${{ secrets.RELEASE_KEY_STORE }}
|
|
RELEASE_KEY_STORE_PASSWORD: ${{ secrets.RELEASE_KEY_STORE_PASSWORD }}
|
|
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
|
|
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
|
|
RELEASE_KEY_GOOGLE_API: ${{ secrets.RELEASE_KEY_GOOGLE_API }}
|
|
DEBUG_KEY_GOOGLE_API: ${{ secrets.DEBUG_KEY_GOOGLE_API }}
|
|
RELEASE_KEY_HERE_API: ${{ secrets.RELEASE_KEY_HERE_API }}
|
|
DEBUG_KEY_HERE_API: ${{ secrets.DEBUG_KEY_HERE_API }}
|
|
RELEASE_KEY_OAI_API: ${{ secrets.RELEASE_KEY_OAI_API }}
|
|
DEBUG_KEY_OAI_API: ${{ secrets.DEBUG_KEY_OAI_API }}
|
|
RELEASE_KEY_SENTRY: ${{ secrets.RELEASE_KEY_SENTRY }}
|
|
DEBUG_KEY_SENTRY: ${{ secrets.DEBUG_KEY_SENTRY }}
|
|
run: ./gradlew clean build
|
|
|
|
- name: Create a new GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
fail_on_unmatched_files: true
|
|
files: |
|
|
app-android-journal3/build/outputs/apk/release/app-android-journal3-release.apk
|
|
app-android-journal3/build/outputs/mapping/release/mapping.txt
|