Skip to content

chore(STEF-2702): modernize release workflows on main#827

Merged
egordm merged 1 commit intomainfrom
chore/STEF-2702-manual-release-workflow
Mar 6, 2026
Merged

chore(STEF-2702): modernize release workflows on main#827
egordm merged 1 commit intomainfrom
chore/STEF-2702-manual-release-workflow

Conversation

@egordm
Copy link
Collaborator

@egordm egordm commented Mar 5, 2026

Modernize release workflows on main

Problem

The release.yaml workflow auto-bumped the version in setup.py and pushed directly to main. This is broken by branch protection rules and is an outdated pattern.

Changes

File Action Why
.github/workflows/release.yaml Deleted Auto-pushed to main (blocked by branch rules)
.github/bump_version.py Deleted Only used by the deleted workflow
.github/workflows/python-upload-package.yaml Updated → "Release V3" Modernized trigger pattern
setup.py Version → 0.0.0 Placeholder — real version injected at build time

Release V3 workflow details

  • Triggers: release: published + workflow_dispatch (matches v4 pattern)
  • Guard: Only runs for v3.* tags or 3.*/v3.* manual input
  • Version handling: Extracts from release tag or manual input, strips v prefix, applies via sed to setup.py
  • Concurrency: Added group to prevent parallel runs

How to test

  1. Merge this PR (squash merge recommended for DCO)
  2. Create a draft release with tag v3.4.93 on main
  3. Check that the "Release V3" workflow triggers and runs the version extraction + sed steps correctly
  4. Cancel before publish (or delete the draft release) — the sed and version steps will validate even if you don't want to actually publish
  5. Alternatively: manually trigger workflow_dispatch with version 3.4.93 and verify it runs

Notes

  • release-v4.yaml is left as-is (already uses the correct pattern, runs from release/v4.0.0)
  • No v3 code changes — this is purely CI/CD cleanup

- Delete broken auto-bump release.yaml (pushed directly to main, blocked by branch protection)
- Delete obsolete bump_version.py script
- Update python-upload-package.yaml to 'Release V3' with:
  - Trigger on release published + workflow_dispatch (matches v4 pattern)
  - Guard: only runs for v3.* tags/input
  - Version extraction from release tag or manual input
  - sed-based version injection into setup.py at build time
  - Concurrency group
- Set setup.py version to 0.0.0 placeholder (real version injected by workflow)

Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
@egordm egordm requested a review from a team March 5, 2026 15:44
@github-actions github-actions bot added the chore Improvements or additions to documentation label Mar 5, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

@egordm egordm merged commit f5579b0 into main Mar 6, 2026
8 checks passed
@egordm egordm deleted the chore/STEF-2702-manual-release-workflow branch March 6, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants