File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish Python distribution to PyPI and TestPyPI
2
2
on : push
3
+ jobs :
4
+ build :
5
+ name : Build distribution 📦
6
+ runs-on : ubuntu-latest
7
+
8
+ steps :
9
+ - uses : actions/checkout@v4
10
+ - name : Set up Python
11
+ uses : actions/setup-python@v5
12
+ with :
13
+ python-version : " 3.x"
14
+ - name : Install pypa/build
15
+ run : >-
16
+ python3 -m
17
+ pip install
18
+ build
19
+ --user
20
+ - name : Build a binary wheel and a source tarball
21
+ run : python3 -m build
22
+ - name : Store the distribution packages
23
+ uses : actions/upload-artifact@v3
24
+ with :
25
+ name : python-package-distributions
26
+ path : dist/
27
+
28
+ publish-to-testpypi :
29
+ name : Publish Python distribution to TestPyPI, requires manual approval
30
+ needs :
31
+ - build
32
+ runs-on : ubuntu-latest
33
+
34
+ environment :
35
+ name : testpypi
36
+ url : https://test.pypi.org/p/jam.py-v5-test
37
+
38
+ permissions :
39
+ id-token : write # IMPORTANT: mandatory for trusted publishing
40
+
41
+ steps :
42
+ - name : Download all the dists
43
+ uses : actions/download-artifact@v3
44
+ with :
45
+ name : python-package-distributions
46
+ path : dist/
47
+ - name : Publish distribution to TestPyPI
48
+ uses : pypa/gh-action-pypi-publish@release/v1
49
+ with :
50
+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments