Skip to content

Commit 1b26e55

Browse files
committed
chore: use trusted publishing
1 parent c26573a commit 1b26e55

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
node-version: [ 14.x, 16.x, 18.x ]
18+
node-version: [ 20.x, 22.x, 24.x ]
1919
os: [ windows-latest, ubuntu-latest, macOS-latest ]
2020

2121
# Go
2222
steps:
2323
- name: Check out repo
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v6
2525

2626
- name: Set up Node.js
27-
uses: actions/setup-node@v3
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 == '14.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@v3
73+
uses: actions/checkout@v6
7174

7275
- name: Set up Node.js
73-
uses: actions/setup-node@v3
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)