Skip to content

Correct path

Correct path #10

Workflow file for this run

name: build
on:
release:
types: [created]
push:
branches:
- "**"
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'release'
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
- run: ./gradlew --no-daemon :app:assembleDebug
- uses: actions/upload-artifact@v4
with:
path: ./app/build/outputs/apk/debug/*.apk
retention-days: 3
release:
#TODO, once tested:
#if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
- run: echo "SIGNING_STORE_FILE=$RUNNER_TEMP/keystore.jks" >> $GITHUB_ENV
- run: printenv SIGNING_STORE_FILE_BASE64 | base64 -d > "$SIGNING_STORE_FILE"
env:
SIGNING_STORE_FILE_BASE64: ${{ secrets.ANDROID_SIGNING_STORE_FILE_BASE64 }}
- run: ./gradlew --no-daemon :app:assembleRelease :app:bundleRelease
env:
SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }}
SIGNING_KEY_ALIAS: upload
- run: rm "$SIGNING_STORE_FILE"
# Temporary, for testing without tagging releases
- uses: actions/upload-artifact@v4
with:
path: |
./app/build/outputs/apk/release/*.apk
./app/build/outputs/bundle/release/*.aab
retention-days: 3
#- uses: microbit-foundation/[email protected]
# with:
# file: app/build/outputs/apk/bundle/app-bundle.aab
# asset_name: microbit-bundle-${{ env.TAG }}.aab
#- uses: microbit-foundation/[email protected]
# with:
# file: app/build/outputs/apk/release/app-release.apk
# asset_name: microbit-release-${{ env.TAG }}.apk