Repository navigation
Add release workflow - #12
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues addressed by this PR
This pull request introduces an automated alpha release workflow for the Python package, along with supporting code and tests. The main changes add an
alpha-versioncommand to thepy2cstool, implement the logic for generating and stamping alpha versions, and ensure that alpha releases are only published when appropriate. The PR also updates CI workflows to coordinate access to develop and tags, and adds comprehensive tests for the new functionality.Alpha release workflow and versioning:
.github/workflows/alpha-release.yml, a new workflow that publishes pre-release (alpha) builds of the package from thedevelopbranch to TestPyPI, using a version string based on the BHoM version and UTC timestamp. The workflow only publishes ifdevelophas moved since the last alpha, never commits the stamped version, and coordinates with other workflows to avoid conflicts..github/workflows/python-schema-generation.ymland.github/workflows/release.ymltodevelop-publishing, ensuring only one workflow can write todevelopor its tags at a time. [1] [2]Alpha versioning command and implementation:
alpha-versioncommand topy2cs, which reads the BHoM version from a package’s_version.py, generates a PEP 440-compliant alpha version string with a UTC timestamp, checks that the version is not already released, and (optionally) stamps the version into the file. [1] [2] [3] [4] [5]Testing:
.ci/unit-tests/python/test_py2cs/test_alpha.pywith comprehensive tests for alpha version generation, stamping, error handling, and the CLI command..ci/unit-tests/python/test_py2cs/test_workflows.pywith tests to verify the alpha workflow’s behavior, including dry runs, permissions, tagging, and concurrency.These changes automate and safeguard the process of publishing alpha (pre-release) builds, ensuring correct versioning, workflow coordination, and robust testing.
Test files
Changelog
Additional comments