Skip to content

Commit

Permalink
Added CD workflow for publishing to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
david-yz-liu committed Dec 6, 2024
1 parent f7788c0 commit a10698e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/publish-memory-viz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish memory-viz package to npmjs

on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish --provenance --access public --workspace=memory-viz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### 🔧 Internal changes

- Added a GitHub workflow for automatically publishing memory-viz to npm.
- Added `prepare` script to `memory-viz/package.json`.

## [0.4.0] - 2024-11-19

### ✨ Enhancements
Expand Down
3 changes: 2 additions & 1 deletion memory-viz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"test-cov": "jest --no-cache --coverage",
"watch": "webpack --watch --config webpack.dev.js",
"build-dev": "tsc && webpack --config webpack.dev.js",
"build": "tsc && webpack --config webpack.prod.js"
"build": "tsc && webpack --config webpack.prod.js",
"prepare": "npm run build"
},
"keywords": [
"education",
Expand Down

0 comments on commit a10698e

Please sign in to comment.