File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Build and publish dev release to PyPI
1+ name : Build dev package distributions
22
33on :
44 pull_request :
55 branches :
66 - main
7- # types:
8- # - closed
7+ types :
8+ - closed
99
1010jobs :
1111 build :
12- # if: github.event.pull_request.merged == true
12+ if : github.event.pull_request.merged == true
1313 runs-on : ubuntu-latest
1414 steps :
15+
16+ # we need to fetch the full repo history to use setuptools_scm
1517 - uses : actions/checkout@v6
1618 with :
1719 fetch-depth : 0
@@ -22,11 +24,12 @@ jobs:
2224 version : " 0.10.7"
2325 python-version : " 3.14"
2426 enable-cache : true
27+
2528 - name : Sync dependencies
2629 run : uv sync --all-extras --dev
30+
2731 - name : Build Python package
28- run : |
29- uv build
32+ run : uv build
3033
3134 - name : Upload package distributions as artifact
3235 uses : actions/upload-artifact@v7
3538 path : |
3639 dist/
3740 !dist/.gitignore
38-
39- testpypi-publish :
40- needs : build
41- runs-on : ubuntu-latest
42- environment :
43- name : testpypi
44- url : https://test.pypi.org/p/python-tind-client
45- permissions :
46- id-token : write
47- steps :
48- - uses : actions/checkout@v6
49-
50- - name : Download built package distributions
51- uses : actions/download-artifact@v8
52- with :
53- name : python-package-distributions
54- path : dist/
55-
56- - name : Public package distributions to PyPI
57- uses : pypa/gh-action-pypi-publish@release/v1
58- with :
59- repository-url : https://test.pypi.org/legacy/
Original file line number Diff line number Diff line change 1+ name : Push Release Tags
2+
3+ on :
4+ push :
5+ tags :
6+ - ' **'
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ # we need to fetch the full repo history to use setuptools_scm
14+ - uses : actions/checkout@v6
15+ with :
16+ fetch-depth : 0
17+
18+ - name : Install uv
19+ uses : astral-sh/setup-uv@v7
20+ with :
21+ version : " 0.10.7"
22+ python-version : " 3.14"
23+ enable-cache : true
24+
25+ - name : Sync dependencies
26+ run : uv sync --all-extras --dev
27+
28+ - name : Build Python package
29+ run : uv build
30+
31+ - name : Upload package distributions as artifact
32+ uses : actions/upload-artifact@v7
33+ with :
34+ name : python-package-distributions
35+ path : |
36+ dist/
37+ !dist/.gitignore
38+
39+
40+ pypi-publish :
41+ needs : build
42+ runs-on : ubuntu-latest
43+ environment :
44+ name : pypi
45+ url : https://pypi.org/p/python-tind-client
46+ permissions :
47+ id-token : write
48+ steps :
49+ - uses : actions/checkout@v6
50+
51+ - name : Download built package distributions
52+ uses : actions/download-artifact@v8
53+ with :
54+ name : python-package-distributions
55+ path : dist/
56+
57+ - name : Public package distributions to PyPI
58+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments