File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 2727 "${{ github.api_url }}/repos/${{ github.repository }}/releases/latest")
2828
2929 TAG_NAME=$(echo "$LATEST_RELEASE_JSON" | jq -r .tag_name)
30- # remove the leading 'v' from the tag name
31- echo "latest_version=${TAG_NAME:1}" >> "$GITHUB_OUTPUT"
32- echo "🕰️ Latest released version: $TAG_NAME" >> "$GITHUB_STEP_SUMMARY"
30+ if [ "$TAG_NAME" = "null" ]; then
31+ echo "ERROR: no released versions exist" 1>&2
32+ exit 1
33+ else
34+ # remove the leading 'v' from the tag name
35+ echo "latest_version=${TAG_NAME:1}" >> "$GITHUB_OUTPUT"
36+ echo "🕰️ Latest released version: $TAG_NAME" >> "$GITHUB_STEP_SUMMARY"
37+ fi
3338
3439 - name : Get current version from Cargo.toml
3540 id : main_branch
4146 - name : Compare versions
4247 id : compare_versions
4348 run : |
44- MAIN_BRANCH_VERSION="${{ steps.main_branch.outputs.version }}"
4549 LATEST_VERSION="${{ steps.releases.outputs.latest_version }}"
50+ MAIN_BRANCH_VERSION="${{ steps.main_branch.outputs.version }}"
4651
4752 # Use sort -V to compare the versions numerically.
4853 # If MAIN_BRANCH_VERSION is truly greater, it will be the second item
You can’t perform that action at this time.
0 commit comments