-
Notifications
You must be signed in to change notification settings - Fork 14
ci(release): add docs/workflow for releasing #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+50
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: v* | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| environment: pypi | ||
| # Using OIDC/Trusted Publisher: https://docs.pypi.org/trusted-publishers/using-a-publisher/ | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Build distribution | ||
| run: | | ||
| python -m venv venv | ||
| source venv/bin/activate | ||
| pip install --upgrade build | ||
| python -m build | ||
|
|
||
| - name: Publish distribution to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1.14 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Cutting a new release of the Spin Python SDK | ||
|
|
||
| To cut a new release, you will need to do the following: | ||
|
|
||
| 1. Confirm that [CI is green](https://github.com/spinframework/spin-python-sdk/actions) for the commit selected to be tagged and released. | ||
|
|
||
| 1. If not already bumped, set the intended release version in [pyproject.toml](./pyproject.toml), create a pull request with these changes and merge once approved. | ||
|
|
||
| 1. Checkout the commit with the version bump from above. | ||
|
|
||
| 1. Create and push a new tag with a `v` and then the version number. | ||
|
|
||
| As an example, via the `git` CLI: | ||
|
|
||
| ``` | ||
| # Create a GPG-signed and annotated tag | ||
| git tag -s -m "Spin Python SDK v4.1.0" v4.1.0 | ||
|
|
||
| # Push the tag to the remote corresponding to spinframework/spin-python-sdk (here 'origin') | ||
| git push origin v4.1.0 | ||
| ``` | ||
|
|
||
| 1. Pushing the tag upstream will trigger the [release action](https://github.com/spinframework/spin-python-sdk/actions/workflows/release.yml) which publishes the distribution to pypi.org | ||
|
|
||
| 1. If applicable, create PR(s) or coordinate [documentation](https://github.com/spinframework/spin-docs) needs, e.g. for new features or updated functionality. |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or would we rather use a build artifact, eg via calling the build.yml workflow first, to consolidate build logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's not much duplication, so I think this is fine.