Merge pull request #12 from RezaRostamiNikoo/dev #13
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 the npm registry" | |
on: | |
push: | |
branches: master | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
registry-url: https://registry.npmjs.org | |
- name: install dependencies | |
run: npm ci | |
- name: build the package | |
run: npm run build | |
- name: test the package | |
run: npm test | |
- name: publish to npm | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |