Skip to content

YAML needs spaces

YAML needs spaces #34

Workflow file for this run

name: Publish
on:
push:
branches:
- main
jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: check
uses: EndBug/version-check@v2.1.0
with:
diff-search: true
- name: Set up Node
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install
if: steps.check.outputs.changed == 'true'
run: yarn
- name: Build
if: steps.check.outputs.changed == 'true'
run: yarn build
- name: Test
if: steps.check.outputs.changed == 'true'
run: yarn test
- name: Setup publish token
if: steps.check.outputs.changed == 'true'
run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Publish
if: steps.check.outputs.changed == 'true'
run: |
yarn publish --non-interactive
git tag v$(jq '.version' package.json -r)
git push --tags