Updated package.json, added github ci publish to npm #1
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: Publish to NPM registry | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
jobs: | |
publish-gpr: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
environment: Production | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Version Patcher | |
uses: justalemon/[email protected] | |
with: | |
version: 1.0.${{ github.run_number }} | |
npm-files: 'package.json' | |
- run: npm i | |
- run: git config --global user.name "xprees" | |
- run: git config --global user.email "[email protected]" | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_AUTH_TOKEN }} | |
access: public |