feat: automate release workflow with github environments#96
Merged
Conversation
## Summary Updates the release workflow to use `workflow_dispatch` and GitHub Environments, providing a controlled, automated release process for PyPI and GitHub Marketplace. ## Changes - Switched trigger from `push` (tags) to `workflow_dispatch` with a manual version input. - Added `update-version` job to automatically bump the version in `setup.py`, commit, and create the git tag. - Added `publish-pypi` job tied to the `pypi-release` environment for manual deployment approval before publishing to PyPI. - Added `publish-github-release` job tied to the `marketplace-release` environment to automatically create the GitHub Release (which publishes to the Action Marketplace) after approval. ## Setup Required Before running this workflow, the following environments must be created in Repository Settings > Environments: 1. `pypi-release` (with required reviewers) 2. `marketplace-release` (with required reviewers)
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.
Summary
Updates the release workflow to use
workflow_dispatchand GitHub Environments, providing a controlled, automated release process for PyPI and GitHub Marketplace.Changes
push(tags) toworkflow_dispatchwith a manual version input.update-versionjob to automatically bump the version insetup.py, commit, and create the git tag.publish-pypijob tied to thepypi-releaseenvironment for manual deployment approval before publishing to PyPI.publish-github-releasejob tied to themarketplace-releaseenvironment to automatically create the GitHub Release (which publishes to the Action Marketplace) after approval.Setup Required
Before running this workflow, the following environments must be created in Repository Settings > Environments:
pypi-release(with required reviewers)marketplace-release(with required reviewers)