Skip to content

Auto-update v1.1.0 release with latest APK on every commit #8

Auto-update v1.1.0 release with latest APK on every commit

Auto-update v1.1.0 release with latest APK on every commit #8

Workflow file for this run

name: Build APK on Push
on:
push:
branches:
- main
- develop
- master
pull_request:
branches:
- main
- develop
- master
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Debug APK
run: ./gradlew assembleDebug --stacktrace --no-daemon
- name: Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: patchwork-debug-${{ github.sha }}
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 30
- name: Create or Update Latest Release
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: softprops/action-gh-release@v1
with:
tag_name: v1.1.0
name: Patchwork v1.1.0 (Latest)
body: |
## 🚀 Latest Development Build
**Automatically built from latest commit:** ${{ github.sha }}
### 📦 Download
- **patchwork-debug.apk** - Debug build (recommended for testing)
### 📝 Recent Changes
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for full version history.
---
*This is an automated build. Download the APK below and install on your Android device.*
files: app/build/outputs/apk/debug/app-debug.apk
draft: false
prerelease: false
- name: Comment on PR with APK
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✅ APK built successfully! Download it from the artifacts section above.'
})