Skip to content

npm publish

npm publish #18

Workflow file for this run

name: npm publish
on:
release:
types: [created]
schedule:
- cron: '0 0 * * 0' # weekly, every Sunday at 00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
# - run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: KEY=${{secrets.KEY}} npm run build
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{secrets.NPMJS_TOKEN}}
- run: rm .npmrc && npm config set git-tag-version=false && npm version "${{ github.event.release.tag_name }}" && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPMJS_TOKEN}}