File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2- # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3-
41name : NPM Publish
52
63on :
96
107permissions :
118 id-token : write # Required for OIDC
12- contents : read
9+ contents : write # Required for pushing version bump commit
1310
1411jobs :
1512 publish-npm :
2118 node-version : 22
2219 registry-url : https://registry.npmjs.org/
2320 - run : npm install -g npm@latest
24- - run : npm ci --ignore-scripts --no-fund --no-audit
21+ - run : npm install --ignore-scripts --no-audit --no-fund
22+ - name : Bump version from release tag
23+ run : |
24+ VERSION=${GITHUB_REF_NAME#v}
25+ npm version $VERSION --no-git-tag-version
26+ git config user.name "github-actions[bot]"
27+ git config user.email "github-actions[bot]@users.noreply.github.com"
28+ git add package.json package-lock.json
29+ git commit -m "chore: bump version to $VERSION"
30+ git push origin HEAD:${{ github.event.repository.default_branch }}
2531 - run : npm test
2632 - run : npm run build
2733 - run : npm publish --access public
You can’t perform that action at this time.
0 commit comments