@@ -2,37 +2,38 @@ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2
2
3
3
on : push
4
4
jobs :
5
+
5
6
build :
6
7
name : Build distribution 📦
7
8
runs-on : ubuntu-latest
8
9
9
10
steps :
10
- - uses : actions/checkout@v4
11
- - name : Set up Python
12
- uses : actions/setup-python@v5
13
- with :
14
- python-version : " 3.x"
11
+ - uses : actions/checkout@v4
12
+ - name : Set up Python
13
+ uses : actions/setup-python@v5
14
+ with :
15
+ python-version : " 3.x"
15
16
16
- - name : Install pypa/build
17
- run : >-
18
- python3 -m
19
- pip install
20
- build
21
- --user
17
+ - name : Install pypa/build
18
+ run : >-
19
+ python3 -m
20
+ pip install
21
+ build
22
+ --user
22
23
23
- - name : Build a binary wheel and a source tarball
24
- run : python3 -m build
24
+ - name : Build a binary wheel and a source tarball
25
+ run : python3 -m build
25
26
26
- - name : Store the distribution packages
27
- uses : actions/upload-artifact@v3
28
- with :
29
- name : python-package-distributions
30
- path : dist/
27
+ - name : Store the distribution packages
28
+ uses : actions/upload-artifact@v3
29
+ with :
30
+ name : python-package-distributions
31
+ path : dist/
31
32
32
33
publish-to-testpypi :
33
34
name : Publish Python 🐍 distribution 📦 to TestPyPI
34
35
needs :
35
- - build
36
+ - build
36
37
runs-on : ubuntu-latest
37
38
38
39
environment :
@@ -43,34 +44,34 @@ jobs:
43
44
id-token : write # IMPORTANT: mandatory for trusted publishing
44
45
45
46
steps :
46
- - name : Download all the dists
47
- uses : actions/download-artifact@v3
48
- with :
49
- name : python-package-distributions
50
- path : dist/
51
- - name : Publish distribution 📦 to TestPyPI
52
- uses : pypa/gh-action-pypi-publish@release/v1
53
- with :
54
- repository-url : https://test.pypi.org/legacy/
55
- skip-existing : true
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 distribution 📦 to TestPyPI
53
+ uses : pypa/gh-action-pypi-publish@release/v1
54
+ with :
55
+ repository-url : https://test.pypi.org/legacy/
56
+ skip-existing : true
56
57
57
58
publish-to-pypi :
58
59
name : >-
59
60
Publish Python 🐍 distribution 📦 to PyPI
60
61
if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
61
62
needs :
62
- - build
63
+ - build
63
64
runs-on : ubuntu-latest
64
65
environment :
65
66
name : pypi
66
67
url : https://pypi.org/p/ensembledata
67
68
permissions :
68
69
id-token : write # IMPORTANT: mandatory for trusted publishing
69
70
steps :
70
- - name : Download all the dists
71
- uses : actions/download-artifact@v3
72
- with :
73
- name : python-package-distributions
74
- path : dist/
75
- - name : Publish distribution 📦 to PyPI
76
- uses : pypa/gh-action-pypi-publish@release/v1
71
+ - name : Download all the dists
72
+ uses : actions/download-artifact@v3
73
+ with :
74
+ name : python-package-distributions
75
+ path : dist/
76
+ - name : Publish distribution 📦 to PyPI
77
+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments