Update README.md #21
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: "Release on npm owon" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: npm-publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@master | |
- name: Set up Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org | |
- run: npm ci | |
- run: npm run dist # build the minified version | |
- run: npm run dev # build the CommonJS non-minified version | |
- run: npm test # run tests | |
- id: publish | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_AUTH_TOKEN }} | |
- if: steps.publish.outputs.type != 'none' | |
run: | | |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" |