fix: added missing commads #3
This file contains hidden or 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: NPM Publish | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: npm ci | |
- name: Publish to npm | |
# Use --access=public if it's a scoped package (@username/package-name) | |
run: npm publish --provenance | |
env: | |
# Use an Automation token to avoid 2FA issues | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }} |