You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: document NPM token expiration and rotation requirements
NPM now only supports granular access tokens which expire after 1 year.
Added documentation to workflow comments explaining:
- Token expires after 1 year
- Requires yearly rotation
- How to generate new token on npmjs.com
Users should set a calendar reminder before token expiration.
Copy file name to clipboardExpand all lines: .github/workflows/npm-publish.yml
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,10 @@
3
3
# category: ci
4
4
# type: template
5
5
# name: NPM Publish
6
-
# description: Automatically publish to npm when version changes on main branch
6
+
# description: Automatically publish to npm when version changes on main branch. NOTE: NPM_TOKEN is a granular access token that expires after 1 year and must be rotated annually.
7
7
# secrets:
8
8
# - name: NPM_TOKEN
9
-
# description: NPM authentication token with publish access
9
+
# description: NPM granular access token with publish access (expires after 1 year, requires yearly rotation)
10
10
# required: true
11
11
# inputs: []
12
12
# triggers: [push]
@@ -60,6 +60,9 @@ jobs:
60
60
echo "Version unchanged: $CURRENT_VERSION"
61
61
fi
62
62
63
+
# NOTE: NPM_TOKEN is a granular access token that expires after 1 year.
64
+
# Set a calendar reminder to rotate this token before it expires.
65
+
# Go to npmjs.com → Access Tokens → Generate New Token → Granular Access Token
Copy file name to clipboardExpand all lines: workflows/ci/npm-publish/npm-publish.yml
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,10 @@
3
3
# category: ci
4
4
# type: template
5
5
# name: NPM Publish
6
-
# description: Automatically publish to npm when version changes on main branch
6
+
# description: Automatically publish to npm when version changes on main branch. NOTE: NPM_TOKEN is a granular access token that expires after 1 year and must be rotated annually.
7
7
# secrets:
8
8
# - name: NPM_TOKEN
9
-
# description: NPM authentication token with publish access
9
+
# description: NPM granular access token with publish access (expires after 1 year, requires yearly rotation)
10
10
# required: true
11
11
# inputs: []
12
12
# triggers: [push]
@@ -60,6 +60,9 @@ jobs:
60
60
echo "Version unchanged: $CURRENT_VERSION"
61
61
fi
62
62
63
+
# NOTE: NPM_TOKEN is a granular access token that expires after 1 year.
64
+
# Set a calendar reminder to rotate this token before it expires.
65
+
# Go to npmjs.com → Access Tokens → Generate New Token → Granular Access Token
0 commit comments