docs: update README #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 Package | |
on: | |
push: | |
branches: | |
- main # Triggers on pushes to the main branch | |
#tags: | |
# - 'v*.*.*' # Triggers on tag pushes matching the pattern | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # Ensure this matches your Node.js version | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm test | |
# If you have a build step, include it; otherwise, you can remove this step | |
# - name: Build the package | |
# run: npm run build | |
- name: Publish to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |