File tree Expand file tree Collapse file tree 2 files changed +59
-30
lines changed
Expand file tree Collapse file tree 2 files changed +59
-30
lines changed Original file line number Diff line number Diff line change 1- name : Publish Python distribution
1+ name : Publish Python distribution to PyPI
22
33on :
4- push :
5- branches :
6- - master
4+ release :
5+ types : [published]
76
87jobs :
98 build :
3231
3332 publish-to-pypi :
3433 name : Publish to PyPI
35- if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3634 needs :
3735 - build
3836 runs-on : ubuntu-latest
5048 path : dist/
5149 - name : Publish to PyPI
5250 uses : pypa/gh-action-pypi-publish@release/v1
53-
54- publish-to-testpypi :
55- name : Publish to TestPyPI
56- needs :
57- - build
58- runs-on : ubuntu-latest
59-
60- environment :
61- name : testpypi
62- url : https://test.pypi.org/p/lc-sdk-python
63-
64- permissions :
65- id-token : write # IMPORTANT: mandatory for trusted publishing
66-
67- steps :
68- - name : Download all the dists
69- uses : actions/download-artifact@v3
70- with :
71- name : python-package-distributions
72- path : dist/
73- - name : Publish to TestPyPI
74- uses : pypa/gh-action-pypi-publish@release/v1
75- with :
76- skip-existing : true
77- repository-url : https://test.pypi.org/legacy/
Original file line number Diff line number Diff line change 1+ name : Publish Python distribution to TestPyPI
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ build :
10+ name : Build distribution
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+ - name : Set up Python
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : " 3.8"
19+ - name : Install pypa/build
20+ run : >-
21+ python3 -m
22+ pip install
23+ build
24+ --user
25+ - name : Build a binary wheel and a source tarball
26+ run : python3 -m build
27+ - name : Store the distribution packages
28+ uses : actions/upload-artifact@v3
29+ with :
30+ name : python-package-distributions
31+ path : dist/
32+
33+ publish-to-testpypi :
34+ name : Publish to TestPyPI
35+ needs :
36+ - build
37+ runs-on : ubuntu-latest
38+
39+ environment :
40+ name : testpypi
41+ url : https://test.pypi.org/p/lc-sdk-python
42+
43+ permissions :
44+ id-token : write # IMPORTANT: mandatory for trusted publishing
45+
46+ steps :
47+ - name : Download all the dists
48+ uses : actions/download-artifact@v3
49+ with :
50+ name : python-package-distributions
51+ path : dist/
52+ - name : Publish to TestPyPI
53+ uses : pypa/gh-action-pypi-publish@release/v1
54+ with :
55+ skip-existing : true
56+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments