Skip to content

Commit fa548ea

Browse files
authored
build: migrate npm publishing to OIDC trusted publishers (#705)
## Problem npm has changed granular token from unlimited expiration to 90 day max limit: https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/#granular-npm-access-token-lifetime-limits ## Solution To allow us to not have to rotate token every 90 days, this pr migrates from a granular token stored in aws secrets manager to oidc authentication ## Testing Including a temp comment in this PR so that I can merge in the release-please PR. Then I can see if the packages get published to npm <!--- REMINDER: - Read CONTRIBUTING.md first. - Add test coverage for your changes. - Link to related issues/commits. - Testing: how did you test your changes? - Screenshots if applicable --> ## License By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 49e4924 commit fa548ea

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

.github/workflows/release-please.yaml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77

88
permissions:
9-
id-token: write # This is required for requesting the JWT (aws-actions/configure-aws-credentials)
9+
id-token: write # Required for OIDC authentication with npm
1010
contents: write # to create release commit (google-github-actions/release-please-action)
1111
pull-requests: write # to create release PR (google-github-actions/release-please-action)
1212

@@ -31,22 +31,6 @@ jobs:
3131
persist-credentials: false
3232
if: ${{ fromJson(steps.release.outputs.releases_created) }}
3333

34-
- name: Configure AWS Credentials
35-
uses: aws-actions/configure-aws-credentials@v4
36-
with:
37-
role-to-assume: arn:aws:iam::935785792371:role/GithubNpmPublishAction
38-
role-session-name: language-server-runtimes-github
39-
aws-region: us-east-1
40-
if: ${{ fromJson(steps.release.outputs.releases_created) }}
41-
42-
- name: Get npm access token
43-
uses: aws-actions/aws-secretsmanager-get-secrets@v2
44-
with:
45-
secret-ids: |
46-
npmjs/github_automation
47-
parse-json-secrets: true
48-
if: ${{ fromJson(steps.release.outputs.releases_created) }}
49-
5034
- name: Setup Nodejs
5135
uses: actions/setup-node@v4
5236
with:
@@ -55,10 +39,6 @@ jobs:
5539
scope: '@aws'
5640
if: ${{ fromJson(steps.release.outputs.releases_created) }}
5741

58-
- name: Set token
59-
run: echo "NODE_AUTH_TOKEN=${{ env.NPMJS_GITHUB_AUTOMATION_TOKEN }}" >> $GITHUB_ENV
60-
if: ${{ fromJson(steps.release.outputs.releases_created) }}
61-
6242
- name: Compile and test packages
6343
run: |
6444
npm clean-install

types/chat.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,3 +751,5 @@ export interface SubscriptionDetailsParams {
751751
}
752752

753753
export interface SubscriptionUpgradeParams {}
754+
755+
// temp comment

0 commit comments

Comments
 (0)