version 0.1.0 #25
This file contains hidden or 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: Dry Run Publish | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- run: npm ci | |
- run: npm run build | |
- name: Dry Run Publish | |
uses: JS-DevTools/npm-publish@v3 | |
id: publish | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
dry-run: true | |
- name: Test print | |
if: ${{ steps.publish.outputs.type == '' }} | |
run: | | |
echo "❌ No version change detected. Refusing to publish." | |
exit 1 | |
- name: Report new version | |
if: ${{ steps.publish.outputs.type != '' }} | |
run: echo "✅ Version changed to ${{ steps.publish.outputs.version }}" |