Skip to content
Merged

Dev #24

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
7 changes: 6 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
"vscode": {
"extensions": [
"elagil.pre-commit-helper",
"ms-python.python"
"ms-python.python",
"github.vscode-github-actions",
"vscode-icons-team.vscode-icons",
"yzhang.markdown-all-in-one",
"bierner.markdown-checkbox",
"bierner.markdown-preview-github-styles"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permissions:
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
python_changed: ${{ steps.check-python-changes.outputs.python_changed }}

steps:
- name: Checkout repository
Expand All @@ -35,6 +37,21 @@ jobs:
command: query
version: unreleased

- name: Check for Python file changes
id: check-python-changes
run: |
git fetch origin main
# Compare current commit to previous one on this branch
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
echo "Changed files: $CHANGED_FILES"

# Check if any Python file was changed
if echo "$CHANGED_FILES" | grep -E '\.py$'; then
echo "python_changed=true" >> $GITHUB_ENV
else
echo "python_changed=false" >> $GITHUB_ENV
fi

- name: Set Version Bump Type from GitVersion
id: version-bump
if: github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -117,6 +134,7 @@ jobs:
git push origin ${{ steps.gitversion.outputs.semVer }}

- name: Create GitHub Release
if: env.python_changed == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.gitversion.outputs.semVer }}
Expand All @@ -128,6 +146,7 @@ jobs:
dist/*.whl
dist/*.tar.gz
- name: Upload distributions
if: env.python_changed == 'true'
uses: actions/upload-artifact@v4
with:
name: release-dists
Expand All @@ -136,7 +155,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- create-release
if: github.ref == 'refs/heads/main' # Ensures it only runs for the main branch
if: github.ref == 'refs/heads/main' && needs.create-release.outputs.python_changed == 'true' # Ensures it only runs for the main branch and if Python files were changed
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"elagil.pre-commit-helper",
"ms-python.python"
"ms-python.python",
"github.vscode-github-actions"
]
}
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ 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).

## [Unreleased]

### Added

- Added a step to detect if any Python files were changed (`check-python-changes`) in the release workflow.
- The `release` and `publish to PyPI` steps now only run if Python files were changed.
- The workflow now supports Python 3.12 and Python 3.13 in addition to 3.9–3.11.

- In the Dev Container:
- Added GitHub Actions support extension.
- Added VSCode Icons extension.
- Added Markdown All in One extension.
- Added Markdown Checkbox extension.
- Added Markdown Preview GitHub Styles extension.

- In the VSCode workspace recommendations:
- Added GitHub Actions extension to `.vscode/extensions.json`.

### Changed

- Improved release workflow logic to skip release and publish steps if no Python files were changed.

## [0.7.0] - 2025-06-13

### Added
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.7.0"
version = "0.8.0-preview.2"
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.7.0"
version = "0.8.0-preview.2"
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