Skip to content

Commit cdf65b5

Browse files
committed
chore: split release job, use node 24 for publishing
1 parent 79697f4 commit cdf65b5

File tree

2 files changed

+45
-11
lines changed

2 files changed

+45
-11
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ on:
55
- cron: '0 1 * * *'
66
workflow_dispatch:
77

8-
permissions:
9-
id-token: write
10-
contents: read
11-
128
jobs:
13-
release:
9+
build:
1410
runs-on: macos-latest
1511
steps:
1612
- name: Checkout
@@ -29,11 +25,6 @@ jobs:
2925
with:
3026
version: 9.15.0
3127

32-
- name: Set up Git
33-
run: |
34-
git config --local user.name "Artem Zakharchenko"
35-
git config --local user.email "kettanaito@gmail.com"
36-
3728
- name: Install dependencies
3829
run: pnpm install
3930

@@ -46,6 +37,50 @@ jobs:
4637
- name: Tests
4738
run: pnpm test
4839

40+
- name: Upload build artifacts
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: build-artifacts
44+
path: ./lib
45+
46+
release:
47+
needs: [build]
48+
runs-on: macos-latest
49+
permissions:
50+
id-token: write
51+
contents: read
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
token: ${{ secrets.GH_ADMIN_TOKEN }}
58+
59+
- name: Set up Node.js
60+
uses: actions/setup-node@v4
61+
with:
62+
# NOTE: Trusted Publishing only works with Node.js 24.
63+
node-version: 24
64+
65+
- name: Set up pnpm
66+
uses: pnpm/action-setup@v4
67+
with:
68+
version: 9.15.0
69+
70+
- name: Set up Git
71+
run: |
72+
git config --local user.name "Artem Zakharchenko"
73+
git config --local user.email "kettanaito@gmail.com"
74+
75+
- name: Install dependencies
76+
run: pnpm install
77+
78+
- name: Download build artifacts
79+
uses: actions/download-artifact@v4
80+
with:
81+
name: build-artifacts
82+
path: ./lib
83+
4984
- name: Release
5085
run: pnpm release
5186
env:

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"test": "pnpm test:node && pnpm test:browser",
2323
"test:node": "vitest --project node",
2424
"test:browser": "vitest --project browser",
25-
"prepack": "pnpm test && pnpm build",
2625
"release": "release publish"
2726
},
2827
"publishConfig": {

0 commit comments

Comments
 (0)