Skip to content

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
on:
push:
branches:
- main
#paths:
# - package.json
jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn version
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn build
- id: Publish
name: Publish to NPM
uses: JS-DevTools/npm-publish@v3
strategy: upgrade

Check failure on line 28 in .github/workflows/npm-publish.yml

View workflow run for this annotation

GitHub Actions / Node.js Package

Invalid workflow file

The workflow is not valid. .github/workflows/npm-publish.yml (Line: 28, Col: 9): Unexpected value 'strategy'
with:
token: ${{secrets.NPM_PUBLISH_TOKEN}}
dry-run: false
- name: Post-publish
if: steps.publish.outputs.type != 'none'
run: |
echo "Published ${{ steps.publish.outputs.type }} version: ${{ steps.publish.outputs.version }}"
- name: Publish skipped
if: steps.publish.outputs.type == 'none'
run: |
echo "Version in package.json has not changed. Skipping."
exit 0