File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed
Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,17 @@ name: Publish Package
33on :
44 release :
55 types : [published]
6+ workflow_dispatch :
7+ inputs :
8+ package :
9+ description : ' Package to publish'
10+ required : true
11+ type : choice
12+ options :
13+ - comet-uswds
14+ - comet-extras
15+ - comet-data-viz
16+ - comet-cli
617
718jobs :
819 build-and-publish :
@@ -23,10 +34,19 @@ jobs:
2334 - name : Install dependencies
2435 run : npm ci
2536
37+ - name : Determine Package to Build
38+ id : set-package
39+ run : |
40+ PACKAGE="${{ github.event.inputs.package || 'comet-uswds' }}"
41+ echo "package=$PACKAGE" >> $GITHUB_OUTPUT
42+ echo "build_command=build:$PACKAGE" >> $GITHUB_OUTPUT
43+
2644 - name : Build Package
27- run : npm run build:comet-uswds
45+ run : npm run ${{ steps.set-package.outputs.build_command }}
2846
2947 - name : Publish Package
30- run : cd packages/comet-uswds && npm publish --access public --provenance
48+ run : |
49+ cd packages/${{ steps.set-package.outputs.package }}
50+ npm publish --access public --provenance
3151 env :
3252 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ Note: currently full releases are tied to the main `comet-uswds` package.
20201 . Create a new release branch in the form of ` comet-data-viz-release-[MAJOR.MINOR.PATCH] `
21212 . Create a PR into main (should only include package.json and package-lock.json)
22223 . Once approved, merge the PR into main
23- 4 . Open a terminal on your local machine and navigate to the root of the project
24- 5 . Run a build for the specific package (example below):
23+ 4 . Navigate to the Actions GitHub page and click Publish Package from the left
24+ 5 . Click the Run workflow dropdown, select the package to publish, and click Run workflow
25+ 6 . Verify the Publish Package GitHub Action completes correctly
26+ 7 . Verify a new release is available in NPM
2527
2628```
2729npm run build:comet-data-viz
You can’t perform that action at this time.
0 commit comments