This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
v3.3.3 #19
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: npm-publish | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
# only allow on main or tags | |
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
# We're using npm to publish due to: https://github.com/yarnpkg/yarn/issues/5779 | |
- run: npm install | |
- run: npm run prepack | |
- id: publish | |
uses: JS-DevTools/[email protected] | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
dry-run: ${{ github.event.action != 'published' }} | |
- if: ${{ steps.publish.outputs.type }} | |
run: | | |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" |