Skip to content

Commit

Permalink
disable concurrent running of same workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jamowei committed Dec 6, 2024
1 parent 7396b0a commit 549dd8c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/buildAndRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
tags:
- "v*.*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
buildAndRelease:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -35,11 +39,9 @@ jobs:

- name: Zip the out directory
if: startsWith(github.ref, 'refs/tags/v')
env:
REPO_NAME: ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}
run: |
cd out
zip -r ../${REPO_NAME}-${{ github.ref_name }}.zip *
zip -r ../${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}-${{ github.ref_name }}.zip *
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand Down

0 comments on commit 549dd8c

Please sign in to comment.