From 0c48db92a00109ab57c0b0c03e43a8f79360d0ad Mon Sep 17 00:00:00 2001 From: Skylar Sadlier Date: Fri, 22 May 2026 16:31:15 -0600 Subject: [PATCH] Publish the released commit so pre-releases can be cut from any branch --- .github/workflows/publish.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d990173..85a6e20 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,9 @@ name: Publish to npm # Publishes the package to npm whenever a GitHub Release is published. +# It publishes the exact commit the release tag points to, so a pre-release +# can be cut from any branch (e.g. a beta off `dev`) without that branch +# having to be merged into master first. # # The release tag is the source of truth for the version: # - Stable tag (e.g. v1.2.3) -> published to the "latest" @@ -27,10 +30,8 @@ jobs: contents: write # commit the version bump back to master id-token: write # npm Trusted Publishing (OIDC) + provenance steps: - - name: Checkout master + - name: Check out the released commit uses: actions/checkout@v4 - with: - ref: master - name: Set up Node.js uses: actions/setup-node@v4