File tree Expand file tree Collapse file tree 1 file changed +25
-8
lines changed Expand file tree Collapse file tree 1 file changed +25
-8
lines changed Original file line number Diff line number Diff line change 11
11
PYTHON_LATEST : " 3.11"
12
12
13
13
jobs :
14
- build_and_publish :
14
+ build :
15
15
runs-on : ubuntu-latest
16
16
steps :
17
17
- uses : actions/checkout@v3
18
18
with :
19
19
fetch-depth : 0
20
20
21
- - name : Set up Python
22
- uses : actions/setup-python@v4
21
+ - uses : actions/setup-python@v4
23
22
with :
24
23
python-version : ${{env.PYTHON_LATEST}}
25
24
26
- - name : Install dependencies
25
+ - name : ⬇️ Install dependencies
27
26
run : |
28
27
python -Im pip install --upgrade pip
29
28
python -Im pip install wheel
30
- - name : Build
29
+
30
+ - name : 🏗️ Build
31
31
run : python setup.py sdist bdist_wheel
32
32
33
- - name : Publish to PyPI
33
+ - uses : actions/upload-artifact@v3
34
+ with :
35
+ path : ./dist
36
+
37
+ # https://docs.pypi.org/trusted-publishers/using-a-publisher/
38
+ pypi-publish :
39
+ needs : build
40
+ environment : ' release'
41
+
42
+ name : ⬆️ Upload release to PyPI
43
+ runs-on : ubuntu-latest
44
+ permissions :
45
+ # Mandatory for trusted publishing
46
+ id-token : write
47
+ steps :
48
+ - uses : actions/download-artifact@v3
49
+
50
+ - name : 🚀 Publish package distributions to PyPI
34
51
uses : pypa/gh-action-pypi-publish@release/v1
35
52
with :
36
- user : ' __token__ '
37
- password : ${{ secrets.PYPI_API_TOKEN }}
53
+ packages-dir : artifact/
54
+ print-hash : true
You can’t perform that action at this time.
0 commit comments