ci: split build and release into separate manual-only workflows

Building on every push was wasteful and mixed two different concerns
(a disposable build artifact vs. a published release). Both are now
workflow_dispatch-only (a button in the Actions tab, no more
automatic runs on push/tag):

- build-apk.yml: builds the APK and uploads it as a run artifact.
- release.yml: builds the APK and publishes it as a GitHub Release
  for a given tag.
This commit is contained in:
Claude committed 2026-07-04 09:00:33 +00:00
1 parent 9f8e9e1bed
commit 473a68d3ec
2 files changed
+52 -21

No files matched your search

-21
View File
@@ -1,24 +1,11 @@
name: Build APK
on:
push:
branches:
- main
- claude/main-bugs-review-nd8dax
tags:
- "v*"
workflow_dispatch:
inputs:
release_tag:
description: "Tag to publish as a GitHub Release (e.g. v2.0.2). Leave empty to just build."
required: false
default: ""
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -57,11 +44,3 @@ jobs:
name: TurnProxy-apk
path: app/build/outputs/apk/release/*.apk
if-no-files-found: error
- name: Publish GitHub Release
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.release_tag != '')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || inputs.release_tag }}
files: app/build/outputs/apk/release/*.apk
generate_release_notes: true
+52
View File
@@ -0,0 +1,52 @@
name: Publish Release
on:
workflow_dispatch:
inputs:
tag:
description: "Release tag to create/publish (e.g. v2.0.2)"
required: true
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Install required SDK packages
run: sdkmanager "platforms;android-36" "build-tools;36.0.0"
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build release APK
run: ./gradlew assembleRelease --stacktrace
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
files: app/build/outputs/apk/release/*.apk
generate_release_notes: true