Skip to content

chore: release v1.0.0 #2

chore: release v1.0.0

chore: release v1.0.0 #2

Workflow file for this run

name: Build Android APK
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter build apk --target-platform android-arm64 --release
- uses: actions/upload-artifact@v7
with:
name: codeoff-android-arm64
path: build/app/outputs/flutter-apk/app-release.apk
if-no-files-found: error
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v8
with:
name: codeoff-android-arm64
- name: Upload APK to release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1 || \
gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --generate-notes
gh release upload "$GITHUB_REF_NAME" app-release.apk --clobber