File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ inputs:
2222 description : " [string] NPM tag (e.g., 'latest', 'beta')"
2323 required : false
2424 default : ' latest'
25+ dry-run :
26+ description : " [boolean: 'true'/'false'] Run npm publish --dry-run instead of actual publish"
27+ required : false
28+ default : ' false'
2529 npm-token :
2630 description : ' NPM authentication token'
2731 required : true
5357 working-directory : ${{ inputs.working-directory }}
5458 env :
5559 NODE_AUTH_TOKEN : ${{ inputs.npm-token }}
56- run : npm publish --tag ${{ inputs.tag }} --access public
60+ run : |
61+ if [ "${{ inputs.dry-run }}" == "true" ]; then
62+ npm publish --tag ${{ inputs.tag }} --access public --dry-run
63+ else
64+ npm publish --tag ${{ inputs.tag }} --access public
65+ fi
Original file line number Diff line number Diff line change 2020 type : boolean
2121 required : false
2222 default : false
23- description : " Whether to create a prerelease (overrides label check if provided) "
23+ description : " Whether to create a prerelease"
2424 github-release :
2525 type : boolean
2626 required : false
2727 default : false
28- description : " Whether to create a GitHub release (overrides label check if provided) "
28+ description : " Whether to create a GitHub release"
2929 build-env :
3030 type : string
3131 required : false
3535 type : boolean
3636 required : false
3737 default : false
38- description : " Whether to publish to crates.io (overrides label check if provided)"
38+ description : " Whether to publish to crates.io"
39+ dry-run :
40+ type : boolean
41+ required : false
42+ default : false
43+ description : " Run publish commands in dry-run mode (no actual publishing)"
3944 secrets :
4045 OPENAI_API_KEY :
4146 required : true
9398 include :
9499 - target : x86_64-unknown-linux-gnu
95100 os : ubuntu-latest
96-
97101 - target : aarch64-apple-darwin
98102 os : macos-latest
99103 - target : x86_64-pc-windows-msvc
@@ -141,4 +145,5 @@ jobs:
141145 with :
142146 crate-name : ${{ inputs.binary-name }}
143147 crate-path : ${{ inputs.binary-path }}
148+ dry-run : ${{ inputs.dry-run }}
144149 cargo-registry-token : ${{ secrets.CARGO_REGISTRY_TOKEN }}
Original file line number Diff line number Diff line change 4242 required : false
4343 default : " bun run build"
4444 description : " Build command"
45+ dry-run :
46+ type : boolean
47+ required : false
48+ default : false
49+ description : " Run publish commands in dry-run mode (no actual publishing)"
4550 secrets :
4651 OPENAI_API_KEY :
4752 required : true
@@ -119,4 +124,5 @@ jobs:
119124 tag : ${{ (inputs.prerelease || needs.check-labels.outputs.has_prerelease == 'true') && 'beta' || inputs.npm-tag }}
120125 working-directory : ${{ inputs.working-directory }}
121126 build-command : ${{ inputs.build-command }}
127+ dry-run : ${{ inputs.dry-run }}
122128 npm-token : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments