Skip to content

Commit

Permalink
Merge pull request #44 from MetroStar/war-26
Browse files Browse the repository at this point in the history
WAR-26: Add automated NPM publish
  • Loading branch information
jbouder committed May 15, 2023
2 parents 00ecd1c + 9d0ee32 commit f8991a7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Package

on:
release:
types: [published]

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm ci

- name: Build Package
run: npm run build:comet-uswds

- name: Publish Package
run: npm run publish:comet-uswds
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"build:storybook": "storybook build",
"build:comet-uswds": "cd packages/comet-uswds && rollup -c",
"build:comet-data-viz": "cd packages/comet-data-viz && rollup -c",
"build:comet-extras": "cd packages/comet-extras && rollup -c"
"build:comet-extras": "cd packages/comet-extras && rollup -c",
"publish:comet-uswds": "cd packages/comet-uswds && npm publish --access public --provenance",
"publish:comet-data-viz": "cd packages/comet-data-viz && npm publish --access public --provenance",
"publish:comet-extras": "cd packages/comet-extras && npm publish --access public --provenance"
},
"devDependencies": {
"@babel/core": "^7.19.3",
Expand Down

0 comments on commit f8991a7

Please sign in to comment.