-
-
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.
Merge pull request #1 from DVDAGames/feature/publishing
chore: try to configure publishing workflow
- Loading branch information
Showing
6 changed files
with
736 additions
and
17 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,8 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [ericrallen] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: ericrallen | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
custom: https://supporters.eff.org/donate/ |
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,58 @@ | ||
# adapted from: | ||
# https://til.simonwillison.net/pypi/pypi-releases-from-github | ||
# https://github.com/snok/install-poetry | ||
# https://jacobian.org/til/github-actions-poetry/ | ||
# https://github.com/orgs/community/discussions/25305#discussioncomment-8256560 | ||
|
||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- "**" | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: pypi | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install the latest version of uv and set the python version | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: build release distributions | ||
run: | | ||
uv build | ||
- name: upload windows dists | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
|
||
pypi-publish: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Retrieve release distributions | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
|
||
- name: Publish release distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f |
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,49 @@ | ||
# adapted from: | ||
# https://til.simonwillison.net/pypi/pypi-releases-from-github | ||
# https://github.com/snok/install-poetry | ||
# https://jacobian.org/til/github-actions-poetry/ | ||
# https://github.com/orgs/community/discussions/25305#discussioncomment-8256560 | ||
|
||
name: Release Version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- "**" | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
environment: package | ||
concurrency: release | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.RELEASE_VERSION_BUMP_APP_ID }} | ||
private-key: ${{ secrets.RELEASE_VERSION_BUMP_PRIVATE_KEY }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ steps.app-token.outputs.token }} | ||
|
||
- run: | | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
- name: Python Semantic Release | ||
uses: python-semantic-release/python-semantic-release@master | ||
with: | ||
github_token: ${{ steps.app-token.outputs.token }} |
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,37 @@ | ||
# adapted from: | ||
# https://til.simonwillison.net/pypi/pypi-releases-from-github | ||
# https://github.com/snok/install-poetry | ||
# https://jacobian.org/til/github-actions-poetry/ | ||
name: Run Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install the latest version of uv and set the python version | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
enable-cache: true | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install lint dependencies | ||
run: | | ||
uv sync --group test | ||
- name: Test with python ${{ matrix.python-version }} | ||
run: uv run --frozen pytest |
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.