File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed
Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to npm
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+
15+ - name : Use Node.js 20
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : 20
19+ registry-url : https://registry.npmjs.org
20+
21+ - name : Enable corepack (pnpm)
22+ run : corepack enable
23+
24+ - name : Install dependencies
25+ run : pnpm install --frozen-lockfile
26+
27+ - name : Verify tag matches package.json version
28+ run : |
29+ TAG="${GITHUB_REF_NAME}"
30+ PKG_VERSION="$(node -p "require('./package.json').version")"
31+ if [ "v${PKG_VERSION}" != "${TAG}" ]; then
32+ echo "::error::Tag ${TAG} does not match package.json version v${PKG_VERSION}"
33+ exit 1
34+ fi
35+
36+ - name : Publish
37+ env :
38+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
39+ run : pnpm publish --access public
Original file line number Diff line number Diff line change 11{
22 "name" : " content-structure" ,
33 "type" : " module" ,
4- "version" : " 2.1 .0" ,
4+ "version" : " 2.2 .0" ,
55 "description" : " Stores parsed markdown in SQLite tables that can be used for rendering and database content management." ,
66 "main" : " index.js" ,
77 "bin" : {
You can’t perform that action at this time.
0 commit comments