From ea59b5beef377f5af455f50e18fce46fcf5063c3 Mon Sep 17 00:00:00 2001 From: Zach Nussbaum Date: Thu, 14 Nov 2024 16:28:12 -0500 Subject: [PATCH] build: fix release please double release --- .github/workflows/release-please.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 41110cb..66ab268 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -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 @@ -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 @@ -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}} \ No newline at end of file