Skip to content

Commit a9a7fe0

Browse files
👷 Swith to trusted publishing for the NPM package
Trusted publishing automatically enables the --provenance flag, nothing needs to be done.
1 parent d41bfca commit a9a7fe0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484

8585

8686
publish:
87-
name: Publish package to PyPI
87+
name: Publish packages to PyPI and NPM
8888
runs-on: ubuntu-latest
8989
needs:
9090
- tests
@@ -97,6 +97,7 @@ jobs:
9797
url: https://pypi.org/project/django-cookie-consent/
9898
permissions:
9999
id-token: write
100+
contents: read
100101

101102
steps:
102103
- uses: actions/checkout@v4
@@ -124,12 +125,10 @@ jobs:
124125
- name: Publish a Python distribution to PyPI
125126
uses: pypa/gh-action-pypi-publish@release/v1
126127

127-
- name: Publish NPM package to Github
128+
- name: Publish NPM package
128129
run: |
129-
# Strip git ref prefix from version
130130
version=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
131-
132-
npm publish --new-version="$version" --provenance
131+
npm publish --new-version="$version"
133132
working-directory: js
134133
env:
135134
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)