Skip to content

Commit fbcaba3

Browse files
committed
chore: update to use OIDC publishing
1 parent ef09a6d commit fbcaba3

File tree

2 files changed

+45
-48
lines changed

2 files changed

+45
-48
lines changed

.github/workflows/manual-publish.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/release-please.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
8+
inputs:
9+
dry-run:
10+
description: 'Is this a dry run. If so no package will be published.'
11+
type: boolean
12+
required: true
13+
prerelease:
14+
description: 'Is this a prerelease. If so, then the latest tag will not be updated in npm.'
15+
type: boolean
16+
required: true
717

818
jobs:
919
release-please:
1020
runs-on: ubuntu-latest
21+
if: github.event_name == 'push'
1122
outputs:
1223
release_created: ${{ steps.release.outputs.release_created }}
1324
steps:
@@ -28,14 +39,13 @@ jobs:
2839

2940
- uses: actions/setup-node@v4
3041
with:
31-
node-version: 20.x
42+
node-version: 24.x
3243
registry-url: 'https://registry.npmjs.org'
3344

34-
- uses: launchdarkly/gh-actions/actions/[email protected]
35-
name: 'Get NPM token'
36-
with:
37-
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
38-
ssm_parameter_pairs: '/production/common/releasing/npm/token = NODE_AUTH_TOKEN'
45+
- name: Update NPM
46+
shell: bash
47+
# Must be greater than 11.5.1 for OIDC.
48+
run: npm install -g [email protected]
3949

4050
- name: Install Dependencies
4151
run: npm install
@@ -55,3 +65,32 @@ jobs:
5565
uses: ./.github/actions/publish-docs
5666
with:
5767
github_token: ${{ secrets.GITHUB_TOKEN }}
68+
69+
manual-publish-package:
70+
runs-on: ubuntu-latest
71+
if: github.event_name == 'workflow_dispatch'
72+
permissions:
73+
id-token: write
74+
contents: write
75+
steps:
76+
- uses: actions/checkout@v4
77+
78+
- uses: actions/setup-node@v4
79+
with:
80+
node-version: 24.x
81+
registry-url: 'https://registry.npmjs.org'
82+
83+
- name: Update NPM
84+
shell: bash
85+
# Must be greater than 11.5.1 for OIDC.
86+
run: npm install -g [email protected]
87+
88+
- name: Install Dependencies
89+
run: npm install
90+
91+
- id: publish-npm
92+
name: Publish NPM Package
93+
uses: ./.github/actions/publish-npm
94+
with:
95+
dry-run: ${{ inputs.dry-run }}
96+
prerelease: ${{ inputs.prerelease }}

0 commit comments

Comments
 (0)