Skip to content

Commit 97ade43

Browse files
Snailedltclaude
andcommitted
ci: check out release tag and use action version tags
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c7db6de commit 97ade43

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎.github/workflows/npm_publish.yml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ jobs:
1313
id-token: write # Required for npm trusted publishing (OIDC)
1414
contents: read
1515
steps:
16-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16+
- uses: actions/checkout@v7
1717
with:
18-
# "ref" specifies the branch to check out.
19-
# "github.event.release.target_commitish" is a global variable and specifies the branch the release targeted
20-
# It's empty on manual runs, so the branch selected in the Actions tab is used instead
21-
ref: ${{ github.event.release.target_commitish }}
18+
# Check out the release tag for release events.
19+
# For manual runs, use the branch or tag selected in the Actions tab.
20+
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref }}
2221
persist-credentials: false
2322
# Node 24 ships with npm 11.5.1 or later, which trusted publishing requires
2423
- name: Use Node.js v24
25-
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
24+
uses: actions/setup-node@v7
2625
with:
2726
node-version: 24
2827
package-manager-cache: false

0 commit comments

Comments
 (0)