Publish Package to NPM #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package to NPM | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
publish: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
registry-url: "https://registry.npmjs.org" | ||
- run: yarn | ||
- run: yarn build | ||
- uses: JS-DevTools/npm-publish@v3 | ||
id: publish | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
- if: ${{ steps.publish.outputs.type }} | ||
run: echo "$PCKG_ID published to $PCKG_TAG, old version was [$OLD_VER]" | ||
env: | ||
OLD_VER: ${{ steps.publish.outputs.old-version }} | ||
PCKG_ID: ${{ steps.publish.outputs.id }} | ||
PCKG_TAG: ${{ steps.publish.outputs.tag }} |