From 6d06195888bb649e15af5371ff4192d6fdf99488 Mon Sep 17 00:00:00 2001 From: Binnette Date: Thu, 28 Nov 2024 13:46:38 +0100 Subject: [PATCH] Workflow: update nightly build --- .github/workflows/nightly.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index bc565bff..3723774f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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/checkout@v4.2.2 + with: + ref: ${{ github.event.inputs.branch }} - name: Setup Java JDK uses: actions/setup-java@v4.5.0 @@ -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/action-gh-release@v2.1.0 with: tag_name: 'nightly'