Skip to content

NPM Package Publish

NPM Package Publish #9

Workflow file for this run

name: NPM Package Publish
on:
workflow_run:
workflows: ["update tag & package"]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'push' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- run: npm ci
- run: npm run build
- id: publish
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
- if: ${{ steps.publish.outputs.type }}
run: |
echo "Version changed!"