Skip to content

Commit 1a77115

Browse files
add python release job
1 parent 698c40a commit 1a77115

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/python.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,30 @@ jobs:
9292
- uses: actions/setup-python@v5
9393
with: { python-version: "${{ matrix.python-version }}" }
9494
- run: slap test
95+
96+
publish:
97+
runs-on: ubuntu-latest
98+
needs: test
99+
environment: release
100+
permissions:
101+
id-token: write
102+
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
103+
104+
steps:
105+
- uses: actions/checkout@v4
106+
107+
- name: Set up Python 3.10
108+
uses: actions/setup-python@v5
109+
with:
110+
python-version: "3.10"
111+
112+
- name: Install uv
113+
run: python -m pip install uv
114+
115+
- name: Build dist
116+
run: uv build
117+
118+
- name: Publish
119+
uses: pypa/gh-action-pypi-publish@release/v1
120+
with:
121+
packages-dir: dist/

0 commit comments

Comments
 (0)