Skip to content

Commit c901407

Browse files
authored
feat: add trusted publisher (#332)
1 parent 474fcc5 commit c901407

2 files changed

Lines changed: 45 additions & 5 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: ["ubuntu-latest", "windows-latest"]
17-
python-version: ["3.10", "3.11", "3.12", "3.13"]
17+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
2121

2222
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
23-
uses: actions/setup-python@v5
23+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
allow-prereleases: true
2727

2828
- name: Install uv
29-
uses: astral-sh/setup-uv@v6
29+
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
3030

3131
- name: Create virtual environment
3232
run: uv venv .venv
@@ -54,6 +54,6 @@ jobs:
5454
coverage report
5555
5656
- name: Upload results to Codecov
57-
uses: codecov/codecov-action@v4
57+
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238
5858
with:
5959
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
name: Build distribution
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
12+
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
15+
16+
- name: Build package
17+
run: uv build
18+
19+
- name: Upload dist
20+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
21+
with:
22+
name: dist
23+
path: dist/
24+
25+
publish:
26+
name: Publish to PyPI
27+
needs: build
28+
runs-on: ubuntu-latest
29+
environment: release
30+
permissions:
31+
id-token: write
32+
steps:
33+
- name: Download dist
34+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
35+
with:
36+
name: dist
37+
path: dist/
38+
39+
- name: Publish to PyPI
40+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b

0 commit comments

Comments
 (0)