Skip to content

Commit

Permalink
build: fix release please double release
Browse files Browse the repository at this point in the history
  • Loading branch information
zanussbaum committed Nov 14, 2024
1 parent 534032f commit ea59b5b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ permissions:
jobs:
release-please:
if: |
github.event_name == 'push' ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
(github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'chore(main): release')) ||
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
!startsWith(github.event.workflow_run.head_commit.message, 'chore(main): release'))
runs-on: ubuntu-latest
steps:
- name: Get branch name
Expand All @@ -36,15 +38,13 @@ jobs:
with:
fetch-depth: 0
ref: ${{ steps.branch-name.outputs.branch }}
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}

- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
target-branch: ${{ steps.branch-name.outputs.branch }}
config-file: .github/release-please-config.json
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: .release-please-config.json

# Only proceed with npm steps if a release was created
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -77,4 +77,4 @@ jobs:
if: ${{ steps.release.outputs.release_created }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit ea59b5b

Please sign in to comment.