Skip to content

Commit

Permalink
Increment semver of dev build for Sentry tagged release also
Browse files Browse the repository at this point in the history
  • Loading branch information
vkedwardli committed Jan 12, 2025
1 parent e4c1ff0 commit c4e92ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ jobs:
- name: Upload symbols to Sentry (Windows, macOS, Linux)
run: |
VERSION=$(git describe --tags --always --match "gdxsv-*" | sed -E "s/-([0-9]+)-g(.+)$/-dev.\\1+\\2/g")
# Auto increment semver if it is prelease, since 1.2.3-beta.1 < 1.2.3
if [[ "$VERSION" =~ \.([0-9]+)-dev.[0-9]+\+ ]]; then
PATCH_VERSION="${BASH_REMATCH[1]}"
PATCH_VERSION=$((PATCH_VERSION + 1))
VERSION=$(echo "$VERSION" | sed -E "s/.[0-9]-dev/.${PATCH_VERSION}-dev/")
fi
sentry-cli releases new "$VERSION"
sentry-cli releases set-commits "$VERSION" --auto
sentry-cli debug-files upload symbols
Expand Down

0 comments on commit c4e92ed

Please sign in to comment.