Skip to content

Bump actions

Bump actions #5

Workflow file for this run

name: Publish package to NPM
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- name: Install
run: yarn
- name: Test
run: yarn test
- name: Check publish status
id: check
uses: tehpsalmist/npm-publish-status-action@v1
- name: Publish if necessary
if: ${{ steps.check.outputs.exists == '0' }}
run: yarn npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}