Fixing GitHub Action publish #37
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: Publish to NPM | |
on: push | |
jobs: | |
npm: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup .npmrc file to publish to npm registry | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Check if version has been updated | |
id: check | |
uses: EndBug/version-check@v2 | |
- name: Install dependencies | |
if: steps.check.outputs.changed == 'true' | |
run: yarn install | |
- name: Build Lib | |
if: steps.check.outputs.changed == 'true' | |
run: yarn build-lib | |
# - name: Create tag | |
# if: steps.check.outputs.changed == 'true' | |
# run: echo y | ./devtools/create_tag.sh | |
- name: Publish to npm registry | |
if: steps.check.outputs.changed == 'true' | |
run: npm publish --access public --verbose | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |