Update to version: 3.7.1 #7
Workflow file for this run
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: Build & publish lib to NPM | |
on: | |
workflow_dispatch: | |
push: | |
tags: ["*"] | |
jobs: | |
publish: | |
name: Publish to NPM | |
runs-on: ubuntu-latest | |
env: | |
NPM_PUBLISH_KEY: ${{ secrets.NPM_PUBLISH_KEY }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install NodeJS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- name: Install Deps | |
run: npm ci | |
- name: Lint | |
run: npm run lint -- --no-fix | |
- name: Build | |
run: npm run build | |
- name: Publish | |
shell: bash | |
run: | | |
export NPM_PUBLISH_KEY=${{ env.NPM_PUBLISH_KEY }} | |
echo "//registry.npmjs.org/:_authToken=${NPM_PUBLISH_KEY}" > .npmrc | |
if ${{ !startsWith(github.ref, 'refs/tags/') }}; then | |
npm version prerelease --git-tag-version false --preid=${{ github.sha }} | |
fi | |
npm publish | |