-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure PyPI trusted publishing (#592)
- Loading branch information
1 parent
7f18e59
commit 0e9aa8f
Showing
3 changed files
with
9 additions
and
7 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 |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
- ubuntu-24.04 | ||
- windows-2022 | ||
python-version: ["3.11", "3.12"] | ||
is-draft-pr: | ||
is-draft-pr: | ||
- ${{ github.event.pull_request.draft }} | ||
include: | ||
- python-version: "3.11" | ||
|
@@ -51,7 +51,7 @@ jobs: | |
|
||
- name: Lint (ruff) | ||
run: | | ||
uv run --frozen ruff check . --config pyproject.toml --no-fix ${{ matrix.format-for-github && '--output-format=github' }} | ||
uv run --frozen ruff check . --config pyproject.toml --no-fix ${{ matrix.format-for-github && '--output-format=github' }} | ||
- name: Typing (pyright) | ||
run: | | ||
|
@@ -89,7 +89,7 @@ jobs: | |
- ubuntu-24.04 | ||
- windows-2022 | ||
python-version: ["3.11", "3.12"] | ||
is-draft-pr: | ||
is-draft-pr: | ||
- ${{ github.event.pull_request.draft }} | ||
exclude: | ||
# skip Windows jobs on draft PRs because they are slow | ||
|
@@ -144,6 +144,8 @@ jobs: | |
name: Publish snapshot to TestPyPI | ||
needs: [lint, format, test, docs] | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -168,7 +170,7 @@ jobs: | |
- name: Restore clean Git working directory | ||
# clean Git working directory is needed for the next bumpversion call | ||
# we only need the version result from the first `patch` bump which is stored as a step output | ||
run: git restore . | ||
run: git restore . | ||
|
||
- name: Bump version snapshot time | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
|
@@ -183,7 +185,6 @@ jobs: | |
run: uv publish | ||
env: | ||
UV_PUBLISH_URL: https://test.pypi.org/legacy/ | ||
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }} | ||
|
||
publish-docs-from-main: | ||
name: Publish docs (main) | ||
|
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