Workaround blank screen after navigating back with bundle #153
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- '*' | |
- '!gh-pages' | |
pull_request: | |
branches: | |
- '*' | |
- '!gh-pages' | |
jobs: | |
gh-pages: | |
runs-on: macos-13 | |
needs: ["app"] | |
steps: | |
# The default Java on macos-13 is 17. So we no longer need to set it. | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#java | |
- uses: actions/checkout@v3 | |
- run: make docs | |
- name: Deploy docs to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/dokka/htmlMultiModule | |
test: | |
runs-on: macos-13 | |
steps: | |
# The default Java on macos-13 is 17. So we no longer need to set it. | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#java | |
- uses: actions/checkout@v3 | |
- name: Build sdk | |
run: ./gradlew sdk:assembleRelease | |
- name: Build sdk-okhttp | |
run: ./gradlew sdk-okhttp:assembleRelease | |
app: | |
runs-on: macos-13 | |
needs: ["test"] | |
if: github.ref == 'refs/heads/2023C01' | |
steps: | |
# The default Java on macos-13 is 17. So we no longer need to set it. | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#java | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
- run: npm install -g appcenter-cli | |
- name: Set versionCode | |
run: | | |
VERSION_CODE=$(date +%s) | |
sed -I "" "s/versionCode = 1/versionCode = $VERSION_CODE/" ./javasample/build.gradle.kts | |
- name: Build unsigned APK | |
run: ./gradlew javasample:assembleRelease | |
- name: Install keystore | |
env: | |
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
run: | | |
KEYSTORE_PATH=$RUNNER_TEMP/keystore.jks | |
echo -n "$ANDROID_KEYSTORE_BASE64" | base64 --decode -o $KEYSTORE_PATH | |
- name: Run zipalign | |
run: | | |
"$ANDROID_HOME/build-tools/34.0.0/zipalign" -c -v 4 ./javasample/build/outputs/apk/release/javasample-release-unsigned.apk | |
- name: Run apksigner | |
env: | |
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
run: | | |
"$ANDROID_HOME/build-tools/34.0.0/apksigner" sign \ | |
--ks $RUNNER_TEMP/keystore.jks \ | |
--ks-key-alias "$ANDROID_KEY_ALIAS" \ | |
--ks-pass "pass:$ANDROID_KEYSTORE_PASSWORD" \ | |
--key-pass "pass:$ANDROID_KEY_PASSWORD" \ | |
--out ./javasample/build/outputs/apk/release/javasample-release-signed.apk \ | |
./javasample/build/outputs/apk/release/javasample-release-unsigned.apk | |
- name: Distribute to App Center | |
env: | |
APPCENTER_ACCESS_TOKEN: ${{ secrets.ANDROID_APPCENTER_ACCESS_TOKEN }} | |
run: appcenter distribute release --debug --silent --file ./javasample/build/outputs/apk/release/javasample-release-signed.apk --group "Collaborators" --app "Oursky/Authgear-demo-Android" --release-notes "no release notes" |