File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish NPM Package
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : " Version to release (leave empty to use current package.json version)"
8+ required : false
9+ type : string
10+
11+ jobs :
12+ test :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ - uses : actions/setup-node@v4
17+ with :
18+ node-version : 20
19+ - uses : pnpm/action-setup@v2
20+ with :
21+ version : 9
22+ - run : pnpm install --frozen-lockfile
23+ - run : pnpm run typecheck
24+ - run : pnpm test
25+
26+ publish-npm :
27+ needs : test
28+ runs-on : ubuntu-latest
29+ environment : prod
30+ steps :
31+ - uses : actions/checkout@v4
32+ - uses : actions/setup-node@v4
33+ with :
34+ node-version : 20
35+ registry-url : https://registry.npmjs.org/
36+ - uses : pnpm/action-setup@v2
37+ with :
38+ version : 9
39+ - name : Set version if specified
40+ if : ${{ github.event.inputs.version != '' }}
41+ run : pnpm version ${{ github.event.inputs.version }} --no-git-tag-version
42+ - run : pnpm install --frozen-lockfile
43+ - name : Publish release
44+ run : pnpm run release
45+ env :
46+ NODE_AUTH_TOKEN : ${{secrets.IRON_NPM_PUBLISHING_TOKEN}}
Original file line number Diff line number Diff line change 1212 "test" : " vitest run" ,
1313 "test:watch" : " vitest" ,
1414 "test:coverage" : " vitest run --coverage" ,
15+ "typecheck" : " tsc --noEmit" ,
16+ "release" : " pnpm run build && pnpm publish --access public" ,
1517 "prepublishOnly" : " pnpm run build && pnpm run test"
1618 },
1719 "dependencies" : {
5860 "homepage" : " https://iron.xyz" ,
5961 "bugs" : {
6062 "url" : " https://github.com/ironxyz/mcp-server/issues"
63+ },
64+ "publishConfig" : {
65+ "access" : " public"
6166 }
6267}
Original file line number Diff line number Diff line change 39394 . ** Publish to npm:**
4040
4141 ``` bash
42- pnpm publish
42+ pnpm run release
4343 ```
4444
45455 . ** Push git changes:**
You can’t perform that action at this time.
0 commit comments