Skip to content

Remove commit

Remove commit #8

Workflow file for this run

name: Create Android APK
on:
push:
branches:
- master
paths:
- .github/workflows/build-app.yaml
- src/*
- android/*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Bump version
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
npm version patch
git push origin master
- name: Unpack data
env:
ZIP_PASSWORD: ${{ secrets.ZIP_PASSWORD }}
run: |
unzip "$ZIP_PASSWORD" -o archive.zip -d src/data
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Install deps
run: |
npm install
- name: Build Android APK
run: |
./gradlew assembleRelease
working-directory: android
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.bump_version.outputs.new_version }}
release_name: Release v${{ steps.bump_version.outputs.new_version }}
draft: false
prerelease: false
- name: Upload APK
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: android/app/build/outputs/apk/release/app-release.apk
asset_name: app-release.apk
asset_content_type: application/vnd.android.package-archive