Skip to content

Commit

Permalink
Remove previous nightly release if it exists
Browse files Browse the repository at this point in the history
Co-authored-by: Marcos Medrano <786907+mmmarcos@users.noreply.github.com>
  • Loading branch information
FirelightFlagboy and mmmarcos committed Mar 12, 2024
1 parent 8720727 commit 7766468
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ concurrency:
group: releaser-${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

env:
NIGHTLY_RELEASE: ${{ (github.event_name == 'schedule' || github.ref == 'refs/tags/nightly') && 'true' || 'false' }}

jobs:
scheduled-nightly-build:
if: github.event_name == 'schedule'
Expand Down Expand Up @@ -142,15 +145,24 @@ jobs:
echo "$EOF"
) | tee -a $GITHUB_OUTPUT
- name: Remove previous nightly release
if: env.NIGHTLY_RELEASE == 'true'
run: |
if gh release view nightly; then
gh release delete nightly
else
echo "No nightly release to remove"
fi
- name: Create release
if: github.event_name == 'schedule' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
# FIXME: rollback to `softprops/action-gh-release` once the issue <https://github.com/softprops/action-gh-release/issues/362> is fixed.
uses: FirelightFlagboy/action-gh-release@d9a17b2b70a11ff00e4a7d0be3ca04e74d66de24
with:
draft: true
draft: ${{ env.NIGHTLY_RELEASE != 'true' }}
body: ${{ steps.summary.outputs.output }}
prerelease: ${{ needs.version.outputs.pre != '' || needs.version.outputs.dev != '' || needs.version.outputs.local != '' }}
name: ${{ github.ref_name == 'nightly' && 'Nightly release' || format('Release v{0}', needs.version.outputs.full) }}
name: ${{ env.NIGHTLY_RELEASE == 'true' && 'Nightly release' || format('Release v{0}', needs.version.outputs.full) }}
files: |
release-files/parsec_cloud-${{ needs.version.outputs.pep440 }}-*.whl
release-files/parsec_cloud-${{ needs.version.outputs.pep440 }}-*.whl.sha256
Expand Down

0 comments on commit 7766468

Please sign in to comment.