Skip to content

Commit fd2559e

Browse files
authored
Enhance CI/CD workflow with permissions and environment
Updated continuous deployment workflow to include permissions and environment settings.
1 parent cb219aa commit fd2559e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/continuous-deployment.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ jobs:
4343
publish:
4444
needs: build
4545
runs-on: ubuntu-latest
46-
environment: prerelease
46+
environment:
47+
name: npm
48+
url: https://npmjs.com/package/${{ steps.get-version.outputs.package-name }}/v/${{ steps.get-version.outputs.version }}
49+
permissions:
50+
contents: read
51+
id-token: write
4752

4853
steps:
4954
- uses: actions/setup-node@v3
@@ -65,7 +70,5 @@ jobs:
6570
echo Cannot publish production version
6671
exit 1
6772
- run: npm publish --access public --tag ${{ github.ref_name }} `ls *.tgz`
68-
env:
69-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7073
- name: Generate job summary
7174
run: echo "NPM package has been published to https://npmjs.com/package/${{ steps.get-version.outputs.package-name }}/v/${{ steps.get-version.outputs.version }}." > $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)