File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed
Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 55 branches :
66 - main
77
8- concurrency : ${{ github.workflow }}-${{ github.ref }}
9-
8+ permissions : {}
109jobs :
1110 release :
11+ # prevents this action from running on forks
12+ if : github.repository == 'sveltejs/svelte-json-tree'
13+ permissions :
14+ contents : write # to create release (changesets/action)
15+ id-token : write # OpenID Connect token needed for provenance
16+ pull-requests : write # to create pull request (changesets/action)
1217 name : Release
1318 runs-on : ubuntu-latest
1419 steps :
1520 - name : Checkout Repo
1621 uses : actions/checkout@v4
17-
18- - name : Setup Node.js 20
22+ with :
23+ # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
24+ fetch-depth : 0
25+ - uses : pnpm/action-setup@v4.0.0
26+ - name : Setup Node.js
1927 uses : actions/setup-node@v4
2028 with :
21- node-version : 20
29+ node-version : 22.x
30+ cache : pnpm
2231
23- - uses : pnpm/action-setup@v4.0.0
32+ - run : pnpm install --frozen-lockfile
2433
25- - name : Create Release Pull Request
34+ - name : Create Release Pull Request or Publish to npm
35+ id : changesets
2636 uses : changesets/action@v1
37+ with :
38+ publish : pnpm changeset:publish
2739 env :
28- GITHUB_TOKEN : ${{ secrets.NPM_TOKEN }}
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ NPM_CONFIG_PROVENANCE : true
42+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 2020 "build" : " vite build && npm run package" ,
2121 "build:standalone" : " BUILD_MODE=standalone vite build" ,
2222 "build:bundled" : " BUILD_MODE=bundled vite build" ,
23+ "changeset:publish" : " changeset publish" ,
2324 "preview" : " vite preview" ,
2425 "package" : " svelte-kit sync && svelte-package -i src/lib/svelte-json-tree -o dist/lib && pnpm build:standalone && pnpm build:bundled && publint" ,
2526 "prepublishOnly" : " npm run package" ,
You can’t perform that action at this time.
0 commit comments