File tree Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,45 @@ jobs:
3030 POSTHOG_PERF_API_KEY : ${{ secrets.POSTHOG_PERF_API_KEY }}
3131
3232 - name : Deploy docs
33- if : github.ref == 'refs/heads/main' && matrix.node-version == 'v22.14 .0'
33+ if : github.ref == 'refs/heads/main' && matrix.node-version == 'v22.20 .0'
3434 uses : JamesIves/github-pages-deploy-action@v4
3535 with :
3636 single-commit : true
3737 branch : gh-pages
3838 folder : typedoc
3939
40+ publish :
41+ name : Publish to npm
42+ needs : build
43+ if : startsWith(github.ref, 'refs/tags/v')
44+ runs-on : ubuntu-latest
45+ environment :
46+ name : npm
47+ url : https://www.npmjs.com/package/mockttp
48+ permissions :
49+ contents : read
50+ id-token : write
51+
52+ steps :
53+ - uses : actions/checkout@v4
54+
55+ - uses : actions/setup-node@v4
56+ with :
57+ node-version : ' v22.20.0'
58+ registry-url : ' https://registry.npmjs.org'
59+ cache : ' npm'
60+
61+ - run : npm ci
62+
63+ - name : Verify tag matches package.json version
64+ run : |
65+ TAG_VERSION=${GITHUB_REF#refs/tags/v}
66+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
67+ if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
68+ echo "Error: Tag version (v$TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)"
69+ exit 1
70+ fi
71+ echo "✓ Tag version matches package.json version: $PACKAGE_VERSION"
72+
73+ - run : npm publish
74+
You can’t perform that action at this time.
0 commit comments