File tree Expand file tree Collapse file tree 1 file changed +46
-11
lines changed Expand file tree Collapse file tree 1 file changed +46
-11
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Python 🐍 distribution 📦 to PyPI
1
2
2
- name : Publish to PyPI.org
3
3
on :
4
4
release :
5
5
types : [published]
6
+
6
7
jobs :
7
- pypi :
8
+ build :
9
+ name : Build distribution 📦
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+ with :
15
+ persist-credentials : false
16
+ - name : Set up Python
17
+ uses : actions/setup-python@v5
18
+ with :
19
+ python-version : " 3.x"
20
+ - name : Install pypa/build
21
+ run : >-
22
+ python3 -m
23
+ pip install
24
+ build
25
+ --user
26
+ - name : Build a binary wheel and a source tarball
27
+ run : python3 -m build
28
+ - name : Store the distribution packages
29
+ uses : actions/upload-artifact@v4
30
+ with :
31
+ name : python-package-distributions
32
+ path : dist/
33
+
34
+ publish-to-pypi :
35
+ name : >-
36
+ Publish Python 🐍 distribution 📦 to PyPI
37
+ needs :
38
+ - build
8
39
runs-on : ubuntu-latest
40
+ environment :
41
+ name : pypi
42
+ url : https://pypi.org/p/bayesflow # Replace <package-name> with your PyPI project name
43
+ permissions :
44
+ id-token : write # IMPORTANT: mandatory for trusted publishing
45
+
9
46
steps :
10
- - name : Checkout
11
- uses : actions/checkout@v4
12
- with :
13
- fetch-depth : 0
14
- - run : python3 -m pip install -U build && python3 -m build
15
- - name : Publish package
16
- uses : pypa/gh-action-pypi-publish@release/v1
17
- with :
18
- password : ${{ secrets.PYPI_API_TOKEN }}
47
+ - name : Download all the dists
48
+ uses : actions/download-artifact@v4
49
+ with :
50
+ name : python-package-distributions
51
+ path : dist/
52
+ - name : Publish distribution 📦 to PyPI
53
+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments