Skip to content

Commit

Permalink
Fallback to main for version check if no before sha
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 committed Jan 27, 2025
1 parent ffb58b6 commit a0ad990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
id: version
run: |
set -e -o pipefail
BEFORE_VERSION=$(git show "${{ github.event.before }}:package.json" | jq -r .version)
BEFORE_VERSION=$(git show "${{ github.event.created && 'main' || github.event.before }}:package.json" | jq -r .version)
AFTER_VERSION=$(git show "${{ github.event.after }}:package.json" | jq -r .version)
if [ "$BEFORE_VERSION" != "$AFTER_VERSION" ]; then
Expand Down

0 comments on commit a0ad990

Please sign in to comment.