Skip to content

Merge branch 'main' of https://github.com/SunWuyuan/xgjplus #5

Merge branch 'main' of https://github.com/SunWuyuan/xgjplus

Merge branch 'main' of https://github.com/SunWuyuan/xgjplus #5

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish To NPM
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: 'Automated Version Bump'
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
minor-wording: 'minor-wording'
major-wording: 'major-wording'
patch-wording: 'patch-wording' # Providing patch-wording will override commits
# defaulting to a patch bump.
rc-wording: 'rc-wording'
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "wydev"
- run: npm cache clean --force
- run: npm i
- run: npm run build
- run: npm version patch
- run: npm config get registry
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}