Canary #17
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: Canary | |
on: | |
workflow_dispatch: | |
env: | |
SIGNING_KEYSTORE_FILE: ./secrets/signing_key.jks | |
OUTPUT_DIR: ./dist | |
permissions: | |
contents: write | |
jobs: | |
canary-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: npm | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 17 | |
cache: gradle | |
- name: 🚧 Do prerequisites | |
run: npm ci | |
- name: 🔢 Get version | |
id: app_version | |
run: echo "version=$(npm run --silent version:print-canary)" >> $GITHUB_OUTPUT | |
- name: 🔨 Generate certificate | |
run: | | |
mkdir -p $(dirname $SIGNING_KEYSTORE_FILE) | |
echo $SIGNING_KEYSTORE_FILE_CONTENT | base64 -di > $SIGNING_KEYSTORE_FILE | |
env: | |
SIGNING_KEYSTORE_FILE_CONTENT: ${{ secrets.SIGNING_KEYSTORE_FILE }} | |
- name: 🔨 Build assets | |
run: | | |
npm run prebuild | |
chmod +x ./gradlew | |
./gradlew assembleCanary | |
./gradlew bundleCanary | |
npm run postbuild | |
env: | |
APP_BUILD_TYPE: canary | |
APP_VERSION_NAME: ${{ steps.app_version.outputs.version }} | |
SIGNING_KEYSTORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
- name: 🚀 Upload apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: symphony-v${{ steps.app_version.outputs.version }}-apk | |
path: ${{ env.OUTPUT_DIR }}/symphony-v${{ steps.app_version.outputs.version }}.apk | |
if-no-files-found: error | |
- name: 🚀 Upload aab | |
uses: actions/upload-artifact@v4 | |
with: | |
name: symphony-v${{ steps.app_version.outputs.version }}-aab | |
path: ${{ env.OUTPUT_DIR }}/symphony-v${{ steps.app_version.outputs.version }}.aab | |
if-no-files-found: error | |
- name: 🚀 Upload mapping | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mapping | |
path: ${{ env.OUTPUT_DIR }}/mapping.zip | |
if-no-files-found: error | |
- name: 🚀 Upload native symbols | |
uses: actions/upload-artifact@v4 | |
with: | |
name: native-debug-symbols | |
path: ${{ env.OUTPUT_DIR }}/native-debug-symbols.zip | |
if-no-files-found: ignore |