-
Notifications
You must be signed in to change notification settings - Fork 14
PYTHON-5956 Add python/setup action for shared uv+just CI setup #117
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
+294
−215
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
056171a
PYTHON-5956 Add python/setup action for shared uv+just CI setup
blink1073 352a3dd
Add allow-prereleases input
blink1073 b4f2bf2
Leave exclude-newer unset by default
blink1073 06e7502
Silence the github-env audit on the uv configuration step
blink1073 3f6f4c4
Default allow-prereleases to true
blink1073 f513d3c
Drop the exclude-newer input and split the Python docs out
blink1073 b0f83e8
Merge upstream/main into PYTHON-5956
blink1073 da9b1e2
Make run-install opt-in
blink1073 e14f690
Merge upstream/main into PYTHON-5956
blink1073 0fd560f
Replace run-install with a just-recipes list
blink1073 aa16836
Leave just recipes to the caller
blink1073 3a89bb7
Fix the Python docs index and two stale action paths
blink1073 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
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
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,74 @@ | ||
| # Python Labs Actions | ||
|
|
||
| Opinionated helper actions for Python releases in MongoDB Labs. Unlike the | ||
| [regular Python actions](../python/README.md), these do not generate the SSDLC | ||
| compliance assets or upload anything to S3. | ||
|
|
||
| ## Pre-Publish | ||
|
|
||
| Create a new tag. Verify the tag. | ||
| Push the commit and tag to the source branch unless `dry_run` is set. | ||
|
|
||
| ```yaml | ||
| - name: Setup | ||
| uses: mongodb-labs/drivers-github-tools/setup@v3 | ||
| with: | ||
| ... | ||
|
|
||
| - uses: mongodb-labs/drivers-github-tools/python-labs/pre-publish@v3 | ||
| with: | ||
| version_bump_script: ./.github/scripts/bump-version.sh | ||
| dry_run: ${{ inputs.dry_run }} | ||
| ``` | ||
|
|
||
| ## Post-publish | ||
|
|
||
| To be run after separately publishing the [Python package](https://github.com/pypa/gh-action-pypi-publish#trusted-publishing). | ||
| Handles follow-up tasks related to publishing Python packages. | ||
| It will push the following (dev) version to the source branch. | ||
| It will create a draft GitHub release with generated release notes. | ||
| If `dry_run` is set, nothing will be pushed. | ||
|
|
||
| The jobs should look something like: | ||
|
|
||
| ```yaml | ||
| publish: | ||
| name: Upload release to PyPI | ||
| runs-on: ubuntu-latest | ||
| environment: release | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - name: Download all the dists | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: all-dist-${{ github.run_id }} | ||
| path: dist/ | ||
| - name: Publish package distributions to PyPI | ||
| if: inputs.dry_run == 'false' | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
|
||
| post-publish: | ||
| needs: [publish] | ||
| name: Handle post-publish actions | ||
| runs-on: ubuntu-latest | ||
| environment: release | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| attestations: write | ||
| security-events: write | ||
| steps: | ||
| - name: Setup | ||
| uses: mongodb-labs/drivers-github-tools/setup@v3 | ||
| with: | ||
| ... | ||
|
|
||
| - uses: mongodb-labs/drivers-github-tools/python-labs/post-publish@v3 | ||
| with: | ||
| following_version: ${{ inputs.following_version }} | ||
| version_bump_script: ./.github/scripts/bump-version.sh | ||
| product_name: python-bsonjs | ||
| token: ${{ github.token }} | ||
| dry_run: ${{ inputs.dry_run }} | ||
| ``` |
Oops, something went wrong.
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.
Typo probably ^,
./python/setup?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.
No, that is the new syntax for relative files