-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(release): automate release via release-please (#429)
# changes - add `release-please` as the release automation tool - refactor "install python" into a reusable local action - build and test with Python `3.12` - seems it didn't take much extra effort # notes - previously, the actual "releases" here on GitHub was a mess - `3.7.1` is the latest on PyPI - only exists as a tag on this repo, no release notes - the latest "release" is put out later than some of the higher version tags - `.github/.release-please-manifest.json` -> went with the sha from `3.7.1` which then `release-please` will take as "latest live version", also made `3.7.1` in the manifest --------- Co-authored-by: Balint Bartha <[email protected]>
- Loading branch information
1 parent
d912dfb
commit 30f859e
Showing
14 changed files
with
103 additions
and
112 deletions.
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.12" # 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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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