Merge branch 'main' of github.com:pinkynrg/fix-a11y-lengths #32
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 NPM Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Configure Git | |
run: | | |
git config --global user.email "<>" | |
git config --global user.name "GitHub Actions" | |
- name: Generate version and changelog | |
run: | | |
npx standard-version | |
git push --follow-tags origin main | |
- name: Install dependencies | |
run: npm run build | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
- run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |