File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 77 branches : [main] # all branches where deployments currently occur. Make sure this list matches list of branches in `.releaserc` file.
88
99permissions :
10+ id-token : write
1011 contents : write # access to push the git tag
1112 issues : write # Bot creates an issue if there is an issue during deployment process
1213 pull-requests : write # allow bot to make comments on PRs after they get deployed
@@ -122,6 +123,7 @@ jobs:
122123 name : Deploy to npm
123124 needs : [deploy-git-tag]
124125 if : needs.deploy-git-tag.outputs.new_release_published == 'true' # only run if a git tag was made.
126+ environment : release
125127 runs-on : ubuntu-latest
126128 steps :
127129 - uses : actions/checkout@v4
@@ -132,14 +134,19 @@ jobs:
132134 with :
133135 node-version : ' 20'
134136 cache : ' npm'
137+ registry-url : ' https://registry.npmjs.org'
135138
136- - run : npm ci
139+ - name : Install npm 11.5.1+ for OIDC support
140+ run : npm install -g npm@latest
137141
138- - name : Deploy to npm
139- run : ./scripts/deploy-code.sh
140- env :
141- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
142- IS_PRERELEASE : false # at this time, all deployments are made to `main` production branch
142+ - name : Install dependencies
143+ run : npm ci
144+
145+ - name : Run pre-deploy
146+ run : npm run pre-deploy
147+
148+ - name : Publish to npm
149+ run : npm publish --tag latest
143150
144151 - name : Notify team of successful deployment
145152 uses : slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
You can’t perform that action at this time.
0 commit comments