Skip to content

Add GitHub Action to automatically create GitHub releases on version bump#201

Merged
espenhgn merged 2 commits intomasterfrom
copilot/add-github-action-for-releases
Apr 10, 2026
Merged

Add GitHub Action to automatically create GitHub releases on version bump#201
espenhgn merged 2 commits intomasterfrom
copilot/add-github-action-for-releases

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Description

Adds .github/workflows/create-release.yml — a workflow that automatically creates a GitHub release whenever a push to master introduces a new version that hasn't been tagged yet.

Workflow logic:

  • Extracts version from lfpykit/version.py via grep (no exec()/eval())
  • Checks for an existing v{version} tag using git ls-remote --exit-code
  • If no tag exists, creates a release: tag v{version}, title LFPykit-{version}, with auto-generated notes

Integration with existing workflows:

  • The existing python-publish.yml triggers on release: types: [created], so PyPI publishing is automatically chained after this workflow creates the release — no changes to the publish workflow needed.

Related Issue

Closes #[issue]

Motivation and Context

Releases and PyPI publishes were previously manual. With this change, bumping the version in version.py and merging to master is sufficient to trigger the full release pipeline.

How Has This Been Tested

Workflow logic verified by inspection: the git ls-remote --exit-code guard prevents duplicate releases on repeated pushes without a version bump.

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copilot AI linked an issue Apr 10, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add GitHub action to automatize releases on merge Add GitHub Action to automatically create GitHub releases on version bump Apr 10, 2026
Copilot AI requested a review from espenhgn April 10, 2026 08:37
@espenhgn espenhgn marked this pull request as ready for review April 10, 2026 08:41
@espenhgn espenhgn merged commit ed5081b into master Apr 10, 2026
11 checks passed
@espenhgn espenhgn deleted the copilot/add-github-action-for-releases branch April 10, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GitHub action to automatize GitHub releases

2 participants