-
Notifications
You must be signed in to change notification settings - Fork 283
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
feat(release): automate release via release-please #429
Merged
totallyzen
merged 10 commits into
testcontainers:main
from
totallyzen:feat/release-please-p1
Feb 29, 2024
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
622d7e7
feat(release): automate release via release-please
totallyzen 2d96684
test: core packages did not run on previous commit
totallyzen 2a75146
fix: need checkout before we can use local action
totallyzen ed99e72
fix: pre-commit needs 3.9 for the moment
totallyzen 720e363
chore(release): set bootstrap sha to the 3.7.1 tag
totallyzen 3c71ca1
feat(publish): add steps for publishing the package
totallyzen 1b8c77b
chore: better comments on releasing
totallyzen a342b60
fix(build): test the package with 3.12
totallyzen f5a7a29
fix(build): default build items to 3.12
totallyzen 8caae45
Merge branch 'main' into feat/release-please-p1
totallyzen 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 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,3 @@ | ||
{ | ||
".": "3.7.1" | ||
} |
This file contains 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,20 @@ | ||
name: setup-env | ||
description: set up the python environment | ||
|
||
inputs: | ||
python-version: | ||
description: "The python version to install and use" | ||
default: "3.11" # we default to latest supported | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Poetry | ||
run: pipx install poetry | ||
shell: bash | ||
- name: Setup python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
cache: poetry |
This file contains 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,10 @@ | ||
{ | ||
"release-type": "python", | ||
"bootstrap-sha": "28e3a471c32c1036dd5e37df13cdde3b1ba91000", | ||
"packages": { | ||
".": { | ||
"package-name": "testcontainers" | ||
} | ||
}, | ||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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 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 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,19 @@ | ||
name: lint-pr | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
validate: | ||
name: validate-pull-request-title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: validate pull request title | ||
uses: kontrolplane/pull-request-title-validator@ab2b54babb5337246f4b55cf8e0a1ecb0575e46d #v1 |
This file contains 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,35 @@ | ||
name: Release Please | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_created: ${{ steps.track-release.outputs.release_created }} | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
id: track-release | ||
with: | ||
manifest-file: .github/.release-please-manifest.json | ||
config-file: .github/release-please-config.json | ||
publish: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
needs: | ||
- release | ||
if: ${{ needs.release.outputs.release_created }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: ./.github/actions/setup-env | ||
- name: build package | ||
run: poetry build | ||
# this action uploads packages from the `dist/` directory, which poetry has built in the previous step | ||
# usable once we set up trusted publishing, see https://docs.pypi.org/trusted-publishers/using-a-publisher/ | ||
- name: push package | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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.
... which is python 3.12: https://devguide.python.org/versions/
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.
Not quite! :)
https://github.com/testcontainers/testcontainers-python/blob/main/pyproject.toml#L58-L59
BUT, this is definitely a no-brainer follow up once we've rebooted! Thanks for reading! ❤️
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.
Oh fuuu... That should definitely be a <4.0 or even unbounded (I really dislike poetry in that regard, there are a lot of arguments that libraries should never use upper bounds in their own dependency spec).
Fun, we actually use testcontainers-python (or better all the "current" small packages) in a py3.12 project.
Really looking forward to get this rebooted and then a few of the "get rid of dependencies by looking at logs" PRs merged.
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.
@jankatins in the end it took no effort
a342b60
The project is running off of my and @alexanderankin 's excess energy.
Thanks for showing support, it adds a little extra energy to the mix, makes things easier.