-
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.
- Loading branch information
Showing
1 changed file
with
8 additions
and
10 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Nightly APK | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
schedule: # Scheduled jobs only run on the default repository branch | ||
- cron: "0 1 * * *" | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
|
@@ -11,13 +11,14 @@ on: | |
required: true | ||
|
||
jobs: | ||
build: | ||
nightly_build: | ||
name: Nightly build | ||
if: github.ref == 'refs/heads/develop' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
|
||
- name: Setup Java JDK | ||
uses: actions/[email protected] | ||
|
@@ -33,18 +34,15 @@ jobs: | |
run: ./gradlew assembleDebug --stacktrace | ||
|
||
- name: Rename output APK | ||
if: success() | ||
run: | | ||
DATE=$(date +'%Y%m%d') | ||
DATE=$(date +'%Y%m%d%H%M') | ||
mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/OSMTracker-nightly-$DATE.apk | ||
- name: Delete existing Nightly release | ||
if: success() | ||
run: | | ||
gh release delete nightly --yes | ||
continue-on-error: true | ||
run: gh release delete nightly --yes | ||
|
||
- name: Create GitHub Nightly Release | ||
if: success() | ||
uses: softprops/[email protected] | ||
with: | ||
tag_name: 'nightly' | ||
|