chore(release): 2.22.0 #34
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 | |
on: | |
push: | |
branches: | |
- release/* | |
jobs: | |
publish: | |
name: Publish package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v3 | |
- name: Read .nvmrc | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
id: nvm | |
- name: Setup Node (uses version from .nvmrc) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.nvm.outputs.NVMRC }} | |
- name: Cache npm | |
uses: actions/[email protected] | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- name: Install Node dependencies | |
run: npm ci --no-audit --no-optional | |
- name: Build package | |
run: npm run build | |
- name: Publish to npm | |
uses: JS-DevTools/[email protected] | |
with: | |
package: ./dist/package.json | |
token: ${{ secrets.NPM_TOKEN }} |