Skip to content

Commit

Permalink
chore: use github provided concurrency to prevent multiple publish nexts
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Mar 4, 2024
1 parent 803e5b3 commit 8acc356
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ on:

jobs:
publish:
concurrency:
group: publish-next
cancel-in-progress: true

name: Publish @next release to npm
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.repository_owner == 'discordjs' && !(github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)'))
steps:
- name: Cancel previous publish attempts
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
# - name: Cancel previous publish attempts
# uses: styfle/cancel-workflow-action@0.12.1
# with:
# access_token: ${{ github.token }}

- name: Checkout repository
uses: actions/checkout@v4
Expand Down

0 comments on commit 8acc356

Please sign in to comment.