From 05d9d6660b0c4aa9ed65a08da451bd2a2dc97c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Thu, 9 Jul 2026 16:58:13 +0200 Subject: [PATCH] fix(release): narrow release workflow to published tags --- .github/workflows/release-please.yml | 20 ++------------------ release-please-config.json | 1 - 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 13c82fa..a7d2d37 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -4,21 +4,10 @@ on: push: branches: - main - workflow_dispatch: - inputs: - tag_name: - description: Existing release tag to publish artifacts for - required: true - type: string - ref: - description: Git ref to build, defaults to tag_name - required: false - type: string jobs: release-please: runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' }} permissions: contents: write pull-requests: write @@ -37,7 +26,7 @@ jobs: name: Build and publish release artifacts runs-on: ubuntu-latest needs: release-please - if: ${{ always() && (github.event_name == 'workflow_dispatch' || needs.release-please.outputs.release_created == 'true') }} + if: ${{ needs.release-please.outputs.release_created == 'true' }} permissions: artifact-metadata: write attestations: write @@ -45,8 +34,6 @@ jobs: id-token: write steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - ref: ${{ inputs.ref || inputs.tag_name || github.ref }} - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: @@ -89,12 +76,9 @@ jobs: - name: Upload release assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE_TAG: ${{ inputs.tag_name || needs.release-please.outputs.tag_name }} run: | - gh release upload "$RELEASE_TAG" dist/altertable-darwin-* dist/altertable-linux-* dist/altertable-cli.js dist/checksums.txt --clobber + gh release upload "${{ needs.release-please.outputs.tag_name }}" dist/altertable-darwin-* dist/altertable-linux-* dist/altertable-cli.js dist/checksums.txt --clobber - name: Publish npm package - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: npm publish --provenance --access public working-directory: cli diff --git a/release-please-config.json b/release-please-config.json index 5483c4e..d818638 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,5 +1,4 @@ { - "release-as": "1.0.0", "include-component-in-tag": false, "packages": { ".": {