@@ -18,35 +18,46 @@ permissions:
18
18
19
19
jobs :
20
20
build :
21
+ name : Build distribution
21
22
runs-on : ubuntu-latest
23
+
22
24
steps :
23
- - uses : actions/checkout@v3
24
- - name : Set up Python
25
- uses : actions/setup-python@v3
26
- with :
27
- python-version : " 3.10"
28
- - name : Install dependencies
29
- run : |
30
- python -m pip install --upgrade pip
31
- pip install build
32
- - name : Build package
33
- run : python -m build
34
- - name : Archive the package
35
- uses : actions/upload-artifact@v4
36
- with :
37
- name : dist
38
- path : dist
39
- deploy :
25
+ - uses : actions/checkout@v4
26
+ - name : Set up Python
27
+ uses : actions/setup-python@v4
28
+ with :
29
+ python-version : " 3.10"
30
+ - name : Install pypa/build
31
+ run : >-
32
+ python3 -m
33
+ pip install
34
+ build
35
+ --user
36
+ - name : Build a binary wheel and a source tarball
37
+ run : python3 -m build
38
+ - name : Store the distribution packages
39
+ uses : actions/upload-artifact@v3
40
+ with :
41
+ name : python-package-distributions
42
+ path : dist/
43
+
44
+ publish-to-pypi :
45
+ name : >-
46
+ Publish Python distribution to PyPI
47
+ needs :
48
+ - build
40
49
runs-on : ubuntu-latest
50
+ environment :
51
+ name : pypi
52
+ url : https://pypi.org/project/pdbe-arpeggio
41
53
permissions :
42
- id-token : write
43
- needs : build
54
+ id-token : write # IMPORTANT: mandatory for trusted publishing
55
+
44
56
steps :
45
- - name : Download artifact
46
- uses : actions/download-artifact@v4
47
- with :
48
- name : dist
49
- - name : Publish package
50
- uses : pypa/gh-action-pypi-publish@release/v1
51
- with :
52
- repository-url : https://upload.pypi.org/legacy/
57
+ - name : Download all the dists
58
+ uses : actions/download-artifact@v3
59
+ with :
60
+ name : python-package-distributions
61
+ path : dist/
62
+ - name : Publish distribution to PyPI
63
+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments