fix "Error: Resource not accessible by integration" #2
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: Minimal Android CI Workflow | |
on: | |
pull_request: | |
branches: [ master ] | |
types: [ closed ] | |
concurrency: | |
group: pico4fun_build_concurrency | |
cancel-in-progress: true | |
jobs: | |
test: | |
if: github.event.pull_request.merged == true | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up AWS Coretto 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
architecture: x64 | |
- name: Run Tests | |
run: bash ./gradlew test --stacktrace | |
apk: | |
name: Generate APK | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Set up AWS Coretto 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
architecture: x64 | |
- name: Build APK | |
run: bash ./gradlew assembleRelease | |
- name: Upload APK | |
uses: actions/upload-artifact@v1 | |
with: | |
name: apk | |
path: app/build/outputs/apk/release/app-release.apk | |
release: | |
permissions: write-all | |
name: Release APK | |
needs: apk | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download APK from build | |
uses: actions/download-artifact@v1 | |
with: | |
name: apk | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.TNAME }}${{ env.AARCH }} | |
release_name: ${{ env.RNAME }} | |
- name: Upload Release APK | |
id: upload_release_asset | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: apk/app-release.apk | |
asset_name: ${{ env.TNAME }}${{ env.AARCH }}.apk | |
asset_content_type: application/gzip | |
env: | |
RNAME: Pico 4 Fun | |
TNAME: pico4fun_1.0.0_r1_ | |
AARCH: arm64_v8a |