setup ci/cd #16
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: npm Publish to GitHub Package Registry | |
on: | |
push: | |
branches: main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write # allow GITHUB_TOKEN to publish packages | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- run: npm ci | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
registry: "https://npm.pkg.github.com" |