Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ jobs:
run: |
set -euo pipefail

current_version="$(tr -d '[:space:]' < VERSION)"
# Use the latest git tag as the source of truth so the bump is
# always based on the actual last release, even if the VERSION file
# is stale (e.g. a back-merge PR was never merged).
current_version="$(git describe --tags --abbrev=0 2>/dev/null | tr -d '[:space:]')"
if [[ -z "${current_version}" ]]; then
current_version="$(tr -d '[:space:]' < VERSION)"
fi
next_version="$(npx --yes semver@7.6.3 "${current_version}" -i "${{ inputs.bump }}")"
release_branch="release/v${next_version}"

Expand Down
Loading