File tree 6 files changed +99
-0
lines changed
6 files changed +99
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : release
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+
7
+ jobs :
8
+ release :
9
+ name : Create draft release
10
+ outputs :
11
+ release_created : ${{ steps.release.outputs.release_created }}
12
+ tag_name : ${{ steps.release.outputs.tag_name }}
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
16
+ id : release
17
+
18
+ publish-npm :
19
+ name : Publish to npm
20
+ permissions :
21
+ contents : read
22
+ id-token : write
23
+ runs-on : ubuntu-latest
24
+ needs : [release]
25
+ if : ${{ needs.release.outputs.release_created }}
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+ - uses : pnpm/action-setup@v3
29
+ - uses : actions/setup-node@v4
30
+ with :
31
+ node-version : " 18"
32
+ cache : " pnpm"
33
+ - run : pnpm install --frozen-lockfile
34
+ - name : Configure npm user
35
+ run : npm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
36
+ env :
37
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
38
+ - run : pnpm publish --access public
39
+ env :
40
+ # https://docs.npmjs.com/generating-provenance-statements#using-third-party-package-publishing-tools
41
+ NPM_CONFIG_PROVENANCE : true
Original file line number Diff line number Diff line change
1
+ node_modules
2
+
3
+ .idea
4
+ .vscode
Original file line number Diff line number Diff line change
1
+ {
2
+ "." : " 0.0.1"
3
+ }
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+ console . log ( "This is the test CLI!" )
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " @tasshi/demo-publish-node-cli-tool" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " Demo repository publishing Node.js based CLI to npm registry using pnpm" ,
5
+ "publishConfig" : {
6
+ "access" : " public"
7
+ },
8
+ "author" :
" Masaharu TASHIRO <[email protected] >" ,
9
+ "bin" : {
10
+ "demo-cli" : " cli.js"
11
+ },
12
+ "scripts" : {
13
+ "test" : " echo \" Error: no test specified\" && exit 1"
14
+ },
15
+ "repository" : {
16
+ "type" : " git" ,
17
+ "url" : " git+https://github.com/tasshi-playground/demo-publish-node-cli-tool.git"
18
+ },
19
+ "files" : [
20
+ " CHANGELOG.md" ,
21
+ " cli.js"
22
+ ],
23
+ "bugs" : {
24
+ "url" : " https://github.com/tasshi-playground/demo-publish-node-cli-tool/issues"
25
+ },
26
+ "homepage" : " https://github.com/tasshi-playground/demo-publish-node-cli-tool/#readme" ,
27
+ "engines" : {
28
+ "node" : " >=18"
29
+ },
30
+ "packageManager" :
" [email protected] " ,
31
+ "keywords" : [],
32
+ "license" : " MIT"
33
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "packages" : {
3
+ "." : {
4
+ "release-type" : " node" ,
5
+ "prerelease" : false ,
6
+ "bump-minor-pre-major" : true ,
7
+ "bump-patch-for-minor-pre-major" : false ,
8
+ "changelog-path" : " CHANGELOG.md" ,
9
+ "versioning" : " default" ,
10
+ "include-component-in-tag" : false ,
11
+ "include-v-in-tag" : true ,
12
+ "pull-request-title-pattern" : " chore: release ${version} from ${branch}" ,
13
+ "component-no-space" : true
14
+ }
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments