Skip to content

Commit 269ea6e

Browse files
committed
chore: move to oidc npm publishing
1 parent 86430fc commit 269ea6e

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

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

6770
# Go
6871
steps:
6972
- name: Check out repo
70-
uses: actions/checkout@v4
73+
uses: actions/checkout@v6
7174

7275
- name: Set up Node.js
73-
uses: actions/setup-node@v4
76+
uses: actions/setup-node@v6
7477
with:
75-
node-version: lts/*
78+
node-version: 24.x
7679
registry-url: https://registry.npmjs.org/
7780

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

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

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

0 commit comments

Comments
 (0)