File tree Expand file tree Collapse file tree 3 files changed +10
-20
lines changed Expand file tree Collapse file tree 3 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 3737 default : false
3838
3939permissions :
40+ contents : write
4041 # To publish packages with provenance
4142 id-token : write
4243
4344jobs :
4445 release :
4546 name : Release
46- permissions :
47- contents : write
48- # To publish packages with provenance
49- id-token : write
5047 runs-on : ubuntu-latest
51-
48+ environment : npm
5249 steps :
5350 - name : Checkout
5451 uses : actions/checkout@v4
5552
56- - name : Install Pnpm
53+ - name : Setup Pnpm
5754 run : |
5855 npm install -g corepack@latest
5956 corepack enable
6461 node-version : 20
6562 cache : " pnpm"
6663
64+ # Update npm to the latest version to enable OIDC
65+ - name : Update npm
66+ run : |
67+ npm install -g npm@latest
68+ npm --version
69+
6770 - name : Install Dependencies
6871 run : pnpm install
6972
7679 DRY_RUN : ${{ inputs.dry_run }}
7780 TAG : ${{ inputs.tag }}
7881 VERSION : ${{ inputs.version }}
79- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
80-
81-
Original file line number Diff line number Diff line change 77 "types" : " ./dist/index.d.ts" ,
88 "publishConfig" : {
99 "access" : " public" ,
10- "registry" : " https://registry.npmjs.org/" ,
11- "provenance" : true
10+ "registry" : " https://registry.npmjs.org/"
1211 },
1312 "exports" : {
1413 "." : {
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { inc } from "semver";
77const RELEASE_TAG = process . env . TAG || "beta" ;
88const RELEASE_DRY_RUN = process . env . DRY_RUN || "true" ;
99const RELEASE_VERSION_TYPE = process . env . VERSION || "prerelease" ;
10- const RELEASE_NPM_TOKEN = process . env . NPM_TOKEN || "" ;
1110
1211const __dirname = url . fileURLToPath ( new URL ( "." , import . meta. url ) ) ;
1312const PKG_PATH = path . resolve ( __dirname , "../package.json" ) ;
@@ -27,14 +26,6 @@ console.info(`Updating version from ${currentVersion} to ${nextVersion}`);
2726pkg . version = nextVersion ;
2827fs . writeJsonSync ( PKG_PATH , pkg , { spaces : 2 } ) ;
2928
30- // Write npmrc
31- const npmrcPath = `${ process . env . HOME } /.npmrc` ;
32- console . info ( `Writing npmrc to ${ npmrcPath } ` ) ;
33- fs . writeFileSync (
34- npmrcPath ,
35- `//registry.npmjs.org/:_authToken=${ RELEASE_NPM_TOKEN } ` ,
36- ) ;
37-
3829// Publish to npm
3930console . info ( `Publishing to npm with tag ${ RELEASE_TAG } ` ) ;
4031const dryRun = RELEASE_DRY_RUN === "true" ? [ "--dry-run" ] : [ ] ;
You can’t perform that action at this time.
0 commit comments