File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,14 +22,20 @@ jobs:
2222 id : version
2323 run : |
2424 NEW=$(node -p "require('./package.json').version")
25- OLD=$(git show HEAD~1:package.json 2>/dev/null | node -p "JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')).version" 2>/dev/null || echo "")
26- if [ "$NEW" != "$OLD" ]; then
25+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
2726 echo "changed=true" >> "$GITHUB_OUTPUT"
2827 echo "version=$NEW" >> "$GITHUB_OUTPUT"
29- echo "Version changed: $OLD -> $NEW"
28+ echo "Manual dispatch, publishing $NEW"
3029 else
31- echo "changed=false" >> "$GITHUB_OUTPUT"
32- echo "Version unchanged ($NEW), skipping publish"
30+ OLD=$(git show HEAD~1:package.json 2>/dev/null | node -p "JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')).version" 2>/dev/null || echo "")
31+ if [ "$NEW" != "$OLD" ]; then
32+ echo "changed=true" >> "$GITHUB_OUTPUT"
33+ echo "version=$NEW" >> "$GITHUB_OUTPUT"
34+ echo "Version changed: $OLD -> $NEW"
35+ else
36+ echo "changed=false" >> "$GITHUB_OUTPUT"
37+ echo "Version unchanged ($NEW), skipping publish"
38+ fi
3339 fi
3440
3541 - uses : pnpm/action-setup@v4
You can’t perform that action at this time.
0 commit comments