Skip to content
Merged

Dev #22

Show file tree
Hide file tree
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
32 changes: 15 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,35 @@ jobs:
command: query
version: unreleased

- name: Detect Version Bump Type
- name: Set Version Bump Type from GitVersion
id: version-bump
if: github.ref == 'refs/heads/main' # Only update for stable releases
if: github.ref == 'refs/heads/main'
run: |
CHANGELOG="${{ steps.extract-changelog.outputs.result }}"
echo "Extracted Changelog:"
echo "$CHANGELOG"

VERSION_INCREMENT="${{ steps.gitversion.outputs.MajorMinorPatch }}"
TAG="${{ steps.gitversion.outputs.PreReleaseLabel }}"

# Default bump type
BUMP_TYPE="patch"

if echo "$CHANGELOG" | grep -q "### Breaking Changes"; then
# Determine bump type based on GitVersion's calculated version
if [[ "$VERSION_INCREMENT" =~ ^[1-9][0-9]*\.0\.0$ ]]; then
BUMP_TYPE="major"
elif echo "$CHANGELOG" | grep -q "### Removed"; then
BUMP_TYPE="major"
elif echo "$CHANGELOG" | grep -q "### Added"; then
BUMP_TYPE="minor"
elif echo "$CHANGELOG" | grep -q "### Deprecated"; then
elif [[ "$VERSION_INCREMENT" =~ ^[0-9]+\.[1-9][0-9]*\.0$ ]]; then
BUMP_TYPE="minor"
elif echo "$CHANGELOG" | grep -q "### Changed"; then
BUMP_TYPE="minor"
elif echo "$CHANGELOG" | grep -q "### Fixed"; then
BUMP_TYPE="patch"
elif echo "$CHANGELOG" | grep -q "### Security"; then
elif [[ "$VERSION_INCREMENT" =~ ^[0-9]+\.[0-9]+\.[1-9][0-9]*$ ]]; then
BUMP_TYPE="patch"
fi

# Handle pre-release versions
if [[ -n "$TAG" ]]; then
BUMP_TYPE="pre${BUMP_TYPE}"
fi

echo "Version bump detected: $BUMP_TYPE"
echo "bump_type=$BUMP_TYPE" >> $GITHUB_ENV



- name: Update CHANGELOG.md
if: github.ref == 'refs/heads/main' # Only update for stable releases
uses: release-flow/keep-a-changelog-action@v3.0.0
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.1] - 2025-02-24
## [Unreleased]

### Changed

- Ensure that version numbers in ChangeLog and releases are in sync

## [0.5.0] - 2025-02-24

### Changed

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "xurrent"
version = "0.5.0"
version = "0.6.0-preview.11"
authors = [
{ name="Fabian Steiner", email="fabian@stei-ner.net" },
]
Expand All @@ -18,7 +18,7 @@ Homepage = "https://github.com/fasteiner/xurrent-python"
Issues = "https://github.com/fasteiner/xurrent-python/issues"
[tool.poetry]
name = "xurrent"
version = "0.5.0"
version = "0.6.0-preview.11"
description = "A python module to interact with the Xurrent API."
authors = ["Ing. Fabian Franz Steiner BSc. <fabian.steiner@tttech.com>"]
readme = "README.md"
Expand Down