Skip to content

Commit 7d86133

Browse files
committed
simplified publish.yaml
1 parent acd47d0 commit 7d86133

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,19 @@ jobs:
1919
registry-url: 'https://registry.npmjs.org/'
2020
- uses: oven-sh/setup-bun@v1
2121
- run: bun install
22-
- name : update changelog
23-
id: update-changelog
24-
run: bun run update-changelog
25-
continue-on-error: true
26-
- name: Log No Need To Publish
27-
if: steps.update-changelog.outcome == 'failure'
28-
run: echo "skipping publish because no changes were detected"
22+
- name: update changelog
23+
run: |
24+
if bun run update-changelog; then
25+
echo "changelog updated"
26+
else
27+
echo "skipping publish because no changes were detected"
28+
exit 1
29+
fi
2930
- name: Publish to npm
30-
if: steps.update-changelog.outcome == 'success'
3131
run: npm publish
3232
env:
3333
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3434
- name: Push tags
35-
if: steps.update-changelog.outcome == 'success'
3635
run: |
3736
git config --local user.name "github-actions"
3837
git config --local user.email "github-actions@users.noreply.github.com"

0 commit comments

Comments
 (0)