Merge pull request #9 from evicio1/package-json-update #6
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 # Change this back to 'master' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org/' | |
- name: Run CI | |
run: npm ci | |
- name: Build the library | |
run: npm run build -- --project=country-selector-library | |
- name: Publish to npm | |
run: npm publish dist/country-selector-library | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |