Add Automation of Python SDK Release Process.#168
Open
MOmarMiraj wants to merge 67 commits intomainfrom
Open
Conversation
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.
This PR will automate our python wheel building and publishing to PyPi to a GitHub action. This action will run when the RC branches are merged. This has been tested on the fork of my branch here.
I kept the build-wheels.sh script as fallback incase the action ever breaks and we need to run it manually.
On the Test RC MR below, you will see that the pipeline had the option to add release notes. I opted to remove that as GitHub's workflow manual job doesn't accept multiline strings whether its in the workflow dispatch or we grab it from the comments its a lot of workarounds and will make it messy. I feel like it will be easier to manually commit release notes.
The nice thing is the prep and release SDK flow can be incorporated into the Go SDK as well as the JS SDK.
Heres the MOmarMiraj#50 that I have on my fork which runs through this whole flow.
These are the specific jobs:
Release the SDKs on GitHub - https://github.com/MOmarMiraj/onepassword-sdk-python/actions/runs/14983407609
The workflow will be as follows:
Add the release notes manually (adding the release notes with correct markdown is very difficult for some reason so didn't include this in the prep workflow)
Run the release workflow manual on the RC branch which will build and publish on pypi aswell and increment the build and version number.
Our old flow was
make prep-releasewhich would input the version + build + release notes (usually we would just skip this and add it manual)make build-wheelsthis would build all the wheels (but build it very incorrectly and it wouldn't work correctly)make release, we would also need to export our github token and have the pypi API token to publish on PyPi.Dependencies Required for this PR to work:
GPG_SECRET_KEYandPASS_PHRASEto the repository to be able to have signed commits when we have theprep-releaseandreleaseworkflows.