Skip to content

Commit 81d79cc

Browse files
authored
chore: Add manual publish workflow. (#313)
1 parent 29e1a94 commit 81d79cc

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/manual-publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Manual Publish Package
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
dry-run:
6+
description: 'Is this a dry run. If so no package will be published.'
7+
type: boolean
8+
required: true
9+
prerelease:
10+
description: 'Is this a prerelease. If so, then the latest tag will not be updated in npm.'
11+
type: boolean
12+
required: true
13+
14+
jobs:
15+
publish-package:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
id-token: write
19+
contents: write
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20.x
26+
registry-url: 'https://registry.npmjs.org'
27+
28+
- uses: launchdarkly/gh-actions/actions/[email protected]
29+
name: 'Get NPM token'
30+
with:
31+
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
32+
ssm_parameter_pairs: '/production/common/releasing/npm/token = NODE_AUTH_TOKEN'
33+
34+
- name: Install Dependencies
35+
run: npm install
36+
37+
- id: publish-npm
38+
name: Publish NPM Package
39+
uses: ./.github/actions/publish-npm
40+
with:
41+
dry-run: ${{ inputs.dry-run }}
42+
prerelease: ${{ inputs.prerelease }}

0 commit comments

Comments
 (0)