Skip to content

Commit

Permalink
#20: Publish step in dry-run mode was added
Browse files Browse the repository at this point in the history
  • Loading branch information
vlavrynovych committed Nov 11, 2023
1 parent 83c0394 commit c4ad5b4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "16"

- run: npm install
- run: mkdir backups

Expand All @@ -26,10 +27,16 @@ jobs:
id: check
uses: EndBug/version-check@v2

- name: Log when unchanged
if: steps.check.outputs.changed == 'false'
run: 'echo "No version change" && exit 0'

- name: Log when changed
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found in commit ${{ steps.check.outputs.commit }}! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'

- name: Log when unchanged
if: steps.check.outputs.changed == 'false'
run: 'echo "No version change :/"'
- uses: JS-DevTools/npm-publish@v3
# if: steps.check.outputs.changed == 'true'
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
dry-run: true

0 comments on commit c4ad5b4

Please sign in to comment.