Release 4.1.2 #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
# This workflow will build and then publish the package to NPM when a release is created | |
name: NPM Publish | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
npm-publish: | |
name: npm-publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- run: sudo git config --system --add safe.directory /github/workspace | |
- name: Set up Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: 12.18.0 # LTS | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- name: Publish if version has been updated | |
uses: pascalgn/npm-publish-action@4f4bf159e299f65d21cd1cbd96fc5d53228036df | |
with: | |
commit_pattern: "^Release (\\S+)" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically generated | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # in repo settings |