Skip to content

Commit

Permalink
Workflow nightly (#462)
Browse files Browse the repository at this point in the history
Nightly APK build
  • Loading branch information
Binnette authored Nov 23, 2024
1 parent 4c59ab9 commit 108bc4a
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Nightly APK

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch: # This enables manual triggering

jobs:
build:
# if: github.event.schedule_activity.commits > 0
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]

- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew assembleDebug --stacktrace

- name: Rename output APK
if: success()
run: |
DATE=$(date +'%Y%m%d')
mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/OSMTracker-nightly-$DATE.apk
- name: Create or Update GitHub Nightly Release
if: success()
uses: softprops/[email protected]
with:
tag_name: 'nightly'
name: 'Nightly Build'
draft: false
prerelease: true
files: app/build/outputs/apk/debug/OSMTracker-nightly-*.apk
body: "Nightly build for OSMTracker"
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 108bc4a

Please sign in to comment.