You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### made following this guide: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#workflow-definition
2
+
3
+
name: Publish to PyPI
4
+
on:
5
+
push:
6
+
branches:
7
+
- main
8
+
9
+
jobs:
10
+
build:
11
+
name: Build Python distribution
12
+
### we currently only support macOS and python version 3.13
13
+
runs-on: macos-15
14
+
strategy:
15
+
matrix:
16
+
python-version: [3.13]
17
+
steps:
18
+
- uses: actions/checkout@v5
19
+
20
+
- name: Install uv
21
+
uses: astral-sh/setup-uv@v6
22
+
with:
23
+
### it's best practice to pin the UV version
24
+
version: "0.9.5"
25
+
python-version: ${{ matrix.python-version }}
26
+
27
+
- name: Build the wheel
28
+
run: uv build
29
+
30
+
- name: Store the distribution packages
31
+
uses: actions/upload-artifact@v4
32
+
with:
33
+
name: python-package-distributions
34
+
path: dist/
35
+
36
+
publish-to-pypi:
37
+
name: Publish Python distribution to PyPI
38
+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
39
+
needs:
40
+
- build
41
+
runs-on: ubuntu-latest
42
+
environment:
43
+
name: pypi
44
+
url: https://pypi.org/p/project/pyclipper2/
45
+
permissions:
46
+
id-token: write # IMPORTANT: mandatory for trusted publishing
0 commit comments