diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index d0823d0..e861ac1 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -6,32 +6,8 @@ on: workflow_dispatch: # This allows the workflow to be triggered manually jobs: - check-commits: - runs-on: ubuntu-latest - outputs: - has_new_commits: ${{ steps.check-for-commits.outputs.has_new_commits }} - steps: - - name: Check out the repository - uses: actions/checkout@v4.1.7 - - - name: Get the date of the last run - id: last-run - run: echo "DATE=$(date -u -d '1 day ago' +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV - - - name: Check for new commits since the last run - id: check-for-commits - run: | - last_run_date=$(echo "${{ env.DATE }}" | xargs -I {} date -u -d {} +'%Y-%m-%dT%H:%M:%SZ') - new_commits=$(git log --since="$last_run_date" --oneline) - if [ -n "$new_commits" ]; then - echo "::set-output name=has_new_commits::true" - else - echo "::set-output name=has_new_commits::false" - fi - release: runs-on: ubuntu-latest - needs: check-commits env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -39,7 +15,6 @@ jobs: uses: actions/checkout@v4.1.7 - name: Delete existing nightly release - if: needs.check-commits.outputs.has_new_commits == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -52,7 +27,6 @@ jobs: fi - name: Create new release - if: needs.check-commits.outputs.has_new_commits == 'true' uses: actions/create-release@v1.1.4 with: tag_name: nightly @@ -61,10 +35,6 @@ jobs: prerelease: true body: "This is a Nightly build" - - name: No new commits - if: needs.check-commits.outputs.has_new_commits == 'false' - run: echo "No new commits found." - build: name: Build, Sign & Release runs-on: ubuntu-latest