Skip to content

Commit

Permalink
Workflow: update nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
Binnette committed Nov 28, 2024
1 parent 0b278fc commit 6d06195
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/nightly.yml
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:
Expand All @@ -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]
Expand All @@ -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'
Expand Down

0 comments on commit 6d06195

Please sign in to comment.