Build signed release APK #9
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
on: | |
workflow_dispatch: | |
name: Build signed release APK | |
jobs: | |
setup-android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "zulu" | |
java-version: 17 | |
- name: Setup middleware dependency | |
env: | |
token_secret: ${{ secrets.ANYTYPE_SECRET }} | |
user_secret: ${{ secrets.ANYTYPE_USER_SECRET }} | |
amplitude_secret: ${{ secrets.ANYTYPE_AMPLITUDE_SECRET }} | |
amplitude_secret_debug: ${{ secrets.ANYTYPE_AMPLITUDE_DEBUG_SECRET }} | |
sentry_dsn_secret: ${{ secrets.ANYTYPE_SENTRY_DSN_SECRET }} | |
run: ./middleware2.sh $token_secret $user_secret $amplitude_secret $amplitude_secret_debug $sentry_dsn_secret | |
- name: Decrypt secrets | |
run: ./scripts/release/decrypt-secrets.sh | |
env: | |
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }} | |
- name: Setup keystore | |
env: | |
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }} | |
RELEASE_KEY_PWD: ${{ secrets.RELEASE_KEY_PWD }} | |
RELEASE_STORE_PWD: ${{ secrets.RELEASE_STORE_PWD }} | |
run: ./scripts/release/setup-store.sh $token_secret $RELEASE_KEY_ALIAS $RELEASE_KEY_PWD $RELEASE_STORE_PWD | |
- uses: actions/checkout@master | |
with: | |
name: Setup license repository | |
repository: anyproto/open | |
ref: refs/heads/main | |
path: ./open | |
- name: Check licenses | |
run: | | |
cd open | |
python3 tools/generate.py --platform android | |
cd .. | |
sudo gem install license_finder | |
license_finder inherited_decisions add open/decisions.yml | |
license_finder --gradle-command="./gradlew \ | |
-Pcom.anytype.ci=true \ | |
-Dorg.gradle.unsafe.configuration-cache=false" | |
- name: Build APKS | |
run: ./gradlew :app:assembleRelease | |
# - name: Build AAB | |
# run: ./gradlew :app:bundleRelease | |
- name: Clean secrets | |
if: always() | |
run: ./scripts/release/clean-secrets.sh | |
- name: Upload artifacts | |
uses: actions/upload-artifact@master | |
with: | |
name: APK + BUNDLE | |
path: | | |
app/build/outputs/apk/release/ | |
app/build/outputs/bundle/release/ |