Merge pull request #689 from OskarEichler/codex/viewshot-snapshot-import #226
This file contains hidden or 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: Build Example APK | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-example-apk: | |
| name: Build Example APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Install dependencies | |
| run: npm install --legacy-peer-deps | |
| - name: Build library | |
| run: npm run build | |
| - name: Install example dependencies | |
| working-directory: example | |
| run: npm ci --legacy-peer-deps | |
| - name: Build release APK | |
| working-directory: example/android | |
| run: ./gradlew assembleRelease --no-daemon --stacktrace -PnewArchEnabled=true | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: example-apk | |
| path: example/android/app/build/outputs/apk/release/app-release.apk | |
| retention-days: 30 |