Skip to content

Commit b732847

Browse files
authored
build: release using npm trusted publishing (#405)
Fix release for new npm publish system.
1 parent 497688f commit b732847

File tree

10 files changed

+993
-758
lines changed

10 files changed

+993
-758
lines changed

.github/workflows/cicd.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,39 @@ jobs:
2828
- name: Setup Node.js
2929
uses: actions/setup-node@v4
3030
with:
31-
node-version: "22"
31+
node-version: "24"
3232
cache: "pnpm"
3333
- run: pnpm install --frozen-lockfile
3434
- run: pnpm run lint:lib
3535
- run: pnpm run test:lib
3636

37+
3738
CD:
3839
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/next'|| github.ref == 'refs/heads/experimental' || github.ref == 'refs/heads/4.x' || github.ref == 'refs/heads/7.x' }}
3940
runs-on: ubuntu-latest
4041
needs: [CI]
42+
permissions:
43+
contents: write
44+
issues: write
45+
pull-requests: write
46+
id-token: write
4147
steps:
4248
- uses: actions/checkout@v4
4349
with:
44-
fetch-depth: 2
50+
fetch-depth: 0
4551
- uses: pnpm/action-setup@v4
4652
- name: Setup Node.js
4753
uses: actions/setup-node@v4
4854
with:
49-
node-version: "22"
55+
node-version: "24"
5056
cache: "pnpm"
51-
- run: pnpm install --frozen-lockfile
52-
- run: pnpm run build:lib
57+
- name: Install dependencies
58+
run: pnpm install --frozen-lockfile
59+
- name: Audit signatures
60+
run: npm audit signatures
61+
- name: Build library
62+
run: pnpm run build:lib
5363
- name: Release lib to NPM
5464
env:
55-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5665
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5766
run: pnpm run deploy:lib

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
24

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"is-ci": "^4.1.0",
3939
"prettier": "^3.4.2",
4040
"prettier-plugin-tailwindcss": "^0.6.11",
41-
"turbo": "^2.5.6",
41+
"turbo": "^2.8.10",
4242
"typescript": "catalog:"
4343
},
4444
"packageManager": "pnpm@10.14.0"

packages/next-safe-action/README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ You can find a basic working implementation of the library [here](https://github
4141

4242
A big shout-out to all our [sponsors](https://github.com/sponsors/TheEdoRan)! You’re the driving force behind this library's growth, and we're truly grateful for your support. ❤️
4343

44-
### 🥉 Enthusiasts (Bronze)
45-
46-
<table>
47-
<tr>
48-
<td align="center"><a href="https://launch.arcjet.com/Wk7JBrE"><img src="https://avatars.githubusercontent.com/u/24397786?s=120&v=4" width="120" alt="ArcJet"/><br />ArcJet</a></td>
49-
</tr>
50-
</table>
51-
5244
### ☕ Supporters
5345

5446
<table>
@@ -62,6 +54,7 @@ A big shout-out to all our [sponsors](https://github.com/sponsors/TheEdoRan)! Yo
6254
<table>
6355
<tr>
6456
<td align="center"><a href="https://vercel.com"><img src="https://avatars.githubusercontent.com/u/14985020?s=50&v=4" width="50" alt="Vercel"/><br />Vercel</a></td>
57+
<td align="center"><a href="https://launch.arcjet.com/Wk7JBrE"><img src="https://avatars.githubusercontent.com/u/24397786?s=50&v=4" width="50" alt="ArcJet"/><br />ArcJet</a></td>
6558
<td align="center"><a href="https://liam.so"><img src="https://avatars.githubusercontent.com/u/38444224?v=4&size=50" width="50" alt="Liam Murray"/><br />Liam Murray</a></td>
6659
<td align="center"><a href="https://chalifoux.dev"><img src="https://avatars.githubusercontent.com/u/3289533?v=4&size=50" width="50" alt="David Chalifoux"/><br />David Chalifoux</a></td>
6760
<td align="center"><a href="https://www.undheim.io"><img src="https://avatars.githubusercontent.com/u/46612252?v=4&size=50" width="50" alt="Rein Undheim"/><br />Rein Undheim</a></td>
Lines changed: 96 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,98 @@
11
{
2-
"name": "next-safe-action",
3-
"version": "0.0.0-development",
4-
"private": false,
5-
"description": "Type safe and validated Server Actions in your Next.js project.",
6-
"main": "./dist/index.mjs",
7-
"module": "./dist/index.mjs",
8-
"types": "./dist/index.d.mts",
9-
"files": [
10-
"dist"
11-
],
12-
"exports": {
13-
".": "./dist/index.mjs",
14-
"./hooks": "./dist/hooks.mjs",
15-
"./stateful-hooks": "./dist/stateful-hooks.mjs"
16-
},
17-
"typesVersions": {
18-
"*": {
19-
".": [
20-
"./dist/index.d.mts"
21-
],
22-
"hooks": [
23-
"./dist/hooks.d.mts"
24-
],
25-
"stateful-hooks": [
26-
"./dist/stateful-hooks.d.mts"
27-
]
28-
}
29-
},
30-
"funding": [
31-
{
32-
"type": "github",
33-
"url": "https://github.com/sponsors/TheEdoRan"
34-
},
35-
{
36-
"type": "paypal",
37-
"url": "https://www.paypal.com/donate/?hosted_button_id=ES9JRPSC66XKW"
38-
}
39-
],
40-
"scripts": {
41-
"lint": "tsc && prettier --write . && eslint .",
42-
"test": "node --import tsx --test ./src/__tests__/*.test.ts",
43-
"build": "tsdown",
44-
"deploy": "semantic-release"
45-
},
46-
"keywords": [
47-
"next",
48-
"nextjs",
49-
"react",
50-
"rsc",
51-
"react server components",
52-
"mutation",
53-
"action",
54-
"actions",
55-
"react actions",
56-
"next actions",
57-
"server actions"
58-
],
59-
"author": "Edoardo Ranghieri",
60-
"license": "MIT",
61-
"engines": {
62-
"node": ">=18.17"
63-
},
64-
"devDependencies": {
65-
"@eslint/js": "^9.19.0",
66-
"@types/node": "^22",
67-
"@types/react": "^19",
68-
"@types/react-dom": "^19",
69-
"@typescript-eslint/eslint-plugin": "^8.26.1",
70-
"@typescript-eslint/parser": "^8.26.1",
71-
"deepmerge-ts": "^7.1.4",
72-
"eslint": "catalog:",
73-
"eslint-config-prettier": "^9.1.0",
74-
"eslint-define-config": "^2.1.0",
75-
"eslint-plugin-react-hooks": "^5.1.0",
76-
"next": "catalog:",
77-
"react": "catalog:",
78-
"react-dom": "catalog:",
79-
"semantic-release": "^23",
80-
"tsdown": "^0.14.1",
81-
"tsx": "^4.19.2",
82-
"typescript": "catalog:",
83-
"typescript-eslint": "^8.22.0",
84-
"yup": "^1.6.1",
85-
"zod": "^3.24.1"
86-
},
87-
"peerDependencies": {
88-
"next": ">= 14.0.0",
89-
"react": ">= 18.2.0",
90-
"react-dom": ">= 18.2.0"
91-
},
92-
"repository": {
93-
"type": "git",
94-
"url": "https://github.com/TheEdoRan/next-safe-action.git"
95-
}
2+
"name": "next-safe-action",
3+
"version": "0.0.0-development",
4+
"private": false,
5+
"description": "Type safe and validated Server Actions in your Next.js project.",
6+
"main": "./dist/index.mjs",
7+
"module": "./dist/index.mjs",
8+
"types": "./dist/index.d.mts",
9+
"files": [
10+
"dist"
11+
],
12+
"exports": {
13+
".": "./dist/index.mjs",
14+
"./hooks": "./dist/hooks.mjs",
15+
"./stateful-hooks": "./dist/stateful-hooks.mjs"
16+
},
17+
"typesVersions": {
18+
"*": {
19+
".": [
20+
"./dist/index.d.mts"
21+
],
22+
"hooks": [
23+
"./dist/hooks.d.mts"
24+
],
25+
"stateful-hooks": [
26+
"./dist/stateful-hooks.d.mts"
27+
]
28+
}
29+
},
30+
"funding": [
31+
{
32+
"type": "github",
33+
"url": "https://github.com/sponsors/TheEdoRan"
34+
},
35+
{
36+
"type": "paypal",
37+
"url": "https://www.paypal.com/donate/?hosted_button_id=ES9JRPSC66XKW"
38+
}
39+
],
40+
"scripts": {
41+
"lint": "tsc && prettier --write . && eslint .",
42+
"test": "node --import tsx --test ./src/__tests__/*.test.ts",
43+
"build": "tsdown",
44+
"deploy": "semantic-release"
45+
},
46+
"keywords": [
47+
"next",
48+
"nextjs",
49+
"react",
50+
"rsc",
51+
"react server components",
52+
"mutation",
53+
"action",
54+
"actions",
55+
"react actions",
56+
"next actions",
57+
"server actions"
58+
],
59+
"author": "Edoardo Ranghieri",
60+
"license": "MIT",
61+
"engines": {
62+
"node": ">=18.17"
63+
},
64+
"dependencies": {
65+
"deepmerge-ts": "^7.1.5"
66+
},
67+
"devDependencies": {
68+
"@eslint/js": "^9.19.0",
69+
"@types/node": "^22",
70+
"@types/react": "^19",
71+
"@types/react-dom": "^19",
72+
"@typescript-eslint/eslint-plugin": "^8.26.1",
73+
"@typescript-eslint/parser": "^8.26.1",
74+
"eslint": "catalog:",
75+
"eslint-config-prettier": "^9.1.0",
76+
"eslint-define-config": "^2.1.0",
77+
"eslint-plugin-react-hooks": "^5.1.0",
78+
"next": "catalog:",
79+
"react": "catalog:",
80+
"react-dom": "catalog:",
81+
"semantic-release": "^25.0.3",
82+
"tsdown": "^0.20.3",
83+
"tsx": "^4.19.2",
84+
"typescript": "catalog:",
85+
"typescript-eslint": "^8.22.0",
86+
"yup": "^1.6.1",
87+
"zod": "^3.24.1"
88+
},
89+
"peerDependencies": {
90+
"next": ">= 14.0.0",
91+
"react": ">= 18.2.0",
92+
"react-dom": ">= 18.2.0"
93+
},
94+
"repository": {
95+
"type": "git",
96+
"url": "https://github.com/TheEdoRan/next-safe-action.git"
97+
}
9698
}

packages/next-safe-action/tsdown.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ export default defineConfig({
66
clean: true,
77
sourcemap: true,
88
dts: true,
9+
inlineOnly: false,
910
});

0 commit comments

Comments
 (0)