-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nightly APK build
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |