Update actions #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Node.js Package (next tag) | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
registry-url: https://registry.npmjs.org/ | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
- run: pnpm install | |
- run: pnpm test | |
- run: | | |
pnpm version prerelease --no-git-tag-version \ | |
--preid=`git rev-parse --short HEAD` | |
git config --global user.name "Github Action" | |
git commit package.json -m "next tag" | |
pnpm publish --tag next | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |