Skip to content

Commit 8039fb3

Browse files
committed
chore: update release workflow to support additional Node.js versions and OS environments
1 parent d7d5337 commit 8039fb3

2 files changed

Lines changed: 15 additions & 73 deletions

File tree

.github/workflows/release-dispatch.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
needs: lint
2525
strategy:
2626
matrix:
27-
node: ["20.x", "22.x"]
28-
os: [ubuntu-latest]
27+
node: ["20.x", "22.x", "24.x"]
28+
os: [ubuntu-latest, windows-latest, macOS-latest]
2929

3030
steps:
3131
- name: Checkout repo
@@ -46,16 +46,27 @@ jobs:
4646
timeout-minutes: 15
4747
runs-on: ubuntu-latest
4848
if: github.ref == 'refs/heads/main'
49+
environment: release
4950
needs: build
51+
permissions:
52+
id-token: write
53+
contents: write
54+
pull-requests: write
5055
steps:
5156
- name: Checkout
52-
uses: actions/checkout@v4
57+
uses: actions/checkout@v6
5358
with:
5459
fetch-depth: 0
5560

5661
- name: Set up Node.js
5762
uses: labd/gh-actions-typescript/pnpm-install@main
5863

64+
- name: Run build
65+
run: pnpm build
66+
67+
- name: Upgrade npm for trusted publishing
68+
run: npm i -g npm@^11.6.4
69+
5970
- name: Create and publish versions
6071
uses: changesets/action@v1
6172
with:
@@ -65,5 +76,4 @@ jobs:
6576
version: pnpm publish:version
6677
env:
6778
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
69-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
79+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)