Skip to content

Commit af611b1

Browse files
Copilotkentcdodds
andauthored
chore: Update GitHub Actions workflows for npm trusted publishers (#6)
* Initial plan * Update GitHub Actions workflows for npm trusted publishers Co-authored-by: kentcdodds <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: kentcdodds <[email protected]>
1 parent 3131177 commit af611b1

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: ⬇️ Checkout repo
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v5
1414

1515
- name: 🍔 Setup bun
1616
uses: oven-sh/setup-bun@v1
@@ -29,18 +29,23 @@ jobs:
2929
${{ github.repository == 'epicweb-dev/remember' &&
3030
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha',
3131
github.ref) && github.event_name == 'push' }}
32+
permissions:
33+
contents: write # to be able to publish a GitHub release
34+
id-token: write # to enable use of OIDC for npm provenance
35+
issues: write # to be able to comment on released issues
36+
pull-requests: write # to be able to comment on released pull requests
3237
steps:
3338
- name: ⬇️ Checkout repo
34-
uses: actions/checkout@v3
39+
uses: actions/checkout@v5
3540

3641
# I'd prefer to use bun, but I got this error when I tried using bunx instead of npx:
3742
# error TS5042: Option 'project' cannot be mixed with source files on a command line.
3843
# error: "tsc" exited with code 1 (SIGHUP)
3944
# Also, I don't know how to use bun instead of node for semantic-release 🤷‍♂️
4045
- name: ⎔ Setup node
41-
uses: actions/setup-node@v3
46+
uses: actions/setup-node@v6
4247
with:
43-
node-version: 20
48+
node-version: lts/*
4449

4550
- name: 📥 Download deps
4651
uses: bahmutov/npm-install@v1
@@ -54,9 +59,9 @@ jobs:
5459
nodenext --target es2022 --outDir . index.js
5560

5661
- name: 🚀 Release
57-
uses: cycjimmy/semantic-release-action@v3.2.0
62+
uses: cycjimmy/semantic-release-action@v5.0.2
5863
with:
59-
semantic_version: 17
64+
semantic_version: 25
6065
branches: |
6166
[
6267
'+([0-9])?(.{+([0-9]),x}).x',
@@ -68,4 +73,3 @@ jobs:
6873
]
6974
env:
7075
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)