Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 12 additions & 20 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# This workflow will run tests using node and then publish a package to NPM when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]
workflow_dispatch:
workflow_dispatch: {}

permissions:
id-token: write # Required for OIDC

jobs:
build:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
- run: npm ci
node-version: '24'
registry-url: 'https://registry.npmjs.org'
package-manager-cache: false # never use caching in release builds
- run: npm install
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
"dist"
],
"homepage": "https://github.com/TACC/Core-Components",
"repository": {
"type": "git",
"url": "git+https://github.com/TACC/Core-Components.git"
},
"bugs": {
"url": "https://github.com/TACC/Core-Components/issues"
},
"scripts": {
"start": "storybook dev --port 9000",
"build-demo": "storybook build --output-dir demo",
Expand Down