Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only run release deletion once #895

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,20 @@ on:
# - 'branch-name'

jobs:
deleteRelease:
runs-on: ubuntu-latest
steps:
- uses: dev-drprasad/[email protected]
# Note: to update the date of the release, it must be deleted and then recreated
if: github.event_name == 'release' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
tag_name: build-${{ github.ref_name }}
delete_release: true
github_token: ${{ secrets.GITHUB_TOKEN }}

release:
runs-on: ${{ matrix.os }}
needs: deleteRelease
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-13, macos-latest ] # -13 is intel; -latest is ARM
Expand Down Expand Up @@ -188,14 +200,6 @@ jobs:
${{ github.workspace }}/${{ steps.checksumsfn.outputs.FILEPATH }}
${{ github.workspace }}/${{ steps.checksumsfn.outputs.FILEPATH }}.sha512

- uses: dev-drprasad/[email protected]
# Note: to update the date of the release, it must be deleted and then recreated
if: github.event_name == 'release' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
tag_name: build-${{ github.ref_name }}
delete_release: true
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: "Upload binaries to release"
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'release' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
Expand Down
Loading