-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb74380
commit c43f8a5
Showing
11 changed files
with
1,757 additions
and
25 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 |
---|---|---|
|
@@ -6,10 +6,13 @@ env: | |
# this version. Quote the version to avoid interpretation as a floating | ||
# point number. | ||
PYTHON_VERSION: "3.12" | ||
UV_PYTHON_PREFERENCE: "system" | ||
|
||
"on": | ||
merge_group: {} | ||
pull_request: {} | ||
pull_request: | ||
types: | ||
- closed | ||
push: | ||
branches-ignore: | ||
# These should always correspond to pull requests, so ignore them for | ||
|
@@ -19,8 +22,8 @@ env: | |
- "dependabot/**" | ||
- "gh-readonly-queue/**" | ||
- "renovate/**" | ||
- "tickets/**" | ||
- "u/**" | ||
# - "tickets/**" | ||
# - "u/**" | ||
tags: | ||
- "*" | ||
|
||
|
@@ -35,7 +38,7 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
python-version-file: "pyproject.toml" | ||
|
||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
|
@@ -66,8 +69,10 @@ jobs: | |
# won't be set. | ||
if: > | ||
github.event_name != 'merge_group' | ||
&& (startsWith(github.ref, 'refs/tags/') | ||
|| startsWith(github.head_ref, 'tickets/')) | ||
&& ( | ||
startsWith(github.ref, 'refs/tags/') || | ||
startsWith(github.head_ref, 'u/tobyj/') | ||
) | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -79,3 +84,40 @@ jobs: | |
with: | ||
image: ${{ github.repository }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Release -- when PR is merged to main, bump version, make tag, recommit | ||
release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
if: >- | ||
github.event.pull_request.merged == true | ||
github.ref == "refs/heads/main" && | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up UV | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
version: "0.5" | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "pyproject.toml" | ||
|
||
- name: Install Release Manager | ||
run: >- | ||
uv tool install python-semantic-release | ||
- name: Configure Git | ||
run: | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
git config --global user.name "${{ github.actor }}" | ||
|
||
- name: Bump Project Version | ||
env: | ||
GIT_COMMIT_AUTHOR: "${{github.actor}} <${{github.actor}}@users.noreply.github.com>" | ||
run: >- | ||
semantic-release | ||
version --patch | ||
--no-vcs-release --skip-build --no-changelog |
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 @@ | ||
3.12 |
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
Oops, something went wrong.