Skip to content

Format corrected

Format corrected #3

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: Publish
on: push
jobs:
if: |

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

View workflow run for this annotation

GitHub Actions / .github/workflows/npm-publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 9
contains(github.event.head_commit.message, '[skip ci]') == false &&
startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Extract the version and commit body from the tag
shell: bash
id: extract_release
run: |
VERSION="${{ github.ref }}"
VERSION=${VERSION##*/v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
EOF=$(od -An -N6 -x /dev/urandom | tr -d ' ')
BODY=$(git show -s --format=%b)
echo "BODY<<$EOF" >> $GITHUB_OUTPUT
echo "$BODY" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
if [[ $VERSION == *"-"* ]] ; then
echo "TAG=--tag next" >> $GITHUB_OUTPUT
fi
- name: Publish package to npm
shell: bash
run: |
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm whoami
npm publish ${{ steps.extract_release.outputs.TAG }}