Skip to content

Commit 714bcc7

Browse files
committed
chore: move to oidc npm publishing
1 parent 61e4b63 commit 714bcc7

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
# Go
2222
steps:
2323
- name: Check out repo
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2525

2626
- name: Set up Node.js
27-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v6
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030

@@ -49,7 +49,7 @@ jobs:
4949
- name: Notify
5050
uses: sarisia/actions-status-discord@v1
5151
# Only fire alert once
52-
if: github.ref == 'refs/heads/main' && failure() && matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest'
52+
if: github.ref == 'refs/heads/main' && failure() && matrix.node-version == '24.x' && matrix.os == 'ubuntu-latest'
5353
with:
5454
webhook: ${{ secrets.DISCORD_WEBHOOK }}
5555
title: "build and test"
@@ -61,33 +61,32 @@ jobs:
6161
# Publish to package registries
6262
publish:
6363
# Setup
64+
permissions:
65+
id-token: write # Required for OIDC
66+
contents: read
6467
needs: build
6568
if: startsWith(github.ref, 'refs/tags/v')
6669
runs-on: ubuntu-latest
6770

6871
# Go
6972
steps:
7073
- name: Check out repo
71-
uses: actions/checkout@v4
74+
uses: actions/checkout@v6
7275

7376
- name: Set up Node.js
74-
uses: actions/setup-node@v4
77+
uses: actions/setup-node@v6
7578
with:
76-
node-version: lts/*
79+
node-version: 24.x
7780
registry-url: https://registry.npmjs.org/
7881

7982
# Publish to npm
8083
- name: Publish @RC to npm
8184
if: contains(github.ref, 'RC')
8285
run: npm publish --tag RC
83-
env:
84-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8586

8687
- name: Publish @latest to npm
8788
if: contains(github.ref, 'RC') == false #'!contains()'' doesn't work lol
8889
run: npm publish
89-
env:
90-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9190

9291
- name: Notify
9392
uses: sarisia/actions-status-discord@v1

0 commit comments

Comments
 (0)