beta release #17
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 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: detect package.version changes | |
uses: MontyD/package-json-updated-action@master | |
id: version-updated | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
if: steps.version-updated.outputs.has-updated | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
if: steps.version-updated.outputs.has-updated | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies and build 🔧 | |
if: steps.version-updated.outputs.has-updated | |
run: npm ci && npm run build | |
- name: Publish package on NPM 📦 | |
if: steps.version-updated.outputs.has-updated | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |