File tree Expand file tree Collapse file tree 2 files changed +42
-8
lines changed Expand file tree Collapse file tree 2 files changed +42
-8
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to PyPI
2
+ on : push
3
+ jobs :
4
+ build-n-publish :
5
+ name : Build and publish Python π distributions π¦ to PyPI
6
+ runs-on : ubuntu-latest
7
+ if : startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/main'
8
+ permissions :
9
+ id-token : write
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@master
13
+ with :
14
+ fetch-depth : 0
15
+
16
+ - name : Set up Python 3.10
17
+ uses : actions/setup-python@v5
18
+ with :
19
+ python-version : " 3.10"
20
+
21
+ - name : Install pypa/build
22
+ run : |
23
+ pip install build --user
24
+ pip install .
25
+ - name : Install pypa/pdoc
26
+ run : >-
27
+ python -m
28
+ pip install
29
+ .[dev]
30
+ --user
31
+ - name : Generate documentation with pdoc
32
+ run : python -m pdoc -o docs -n pysmart_exporter
33
+
34
+ - name : Build the binary wheel and source tarball
35
+ run : python -m build --sdist --wheel --outdir dist/
36
+
37
+ - name : Publish distribution π¦ to PyPI
38
+ uses : pypa/gh-action-pypi-publish@release/v1
39
+ with :
40
+ skip-existing : true
Original file line number Diff line number Diff line change 1
- name : Publish Python π distributions π¦ to PyPI and TestPyPI
1
+ name : Publish to TestPyPI
2
2
on : push
3
3
jobs :
4
4
build-n-publish :
5
- name : Build and publish Python π distributions π¦ to PyPI and TestPyPI
5
+ name : Build and publish Python π distributions π¦ to TestPyPI
6
6
runs-on : ubuntu-latest
7
7
permissions :
8
8
id-token : write
38
38
with :
39
39
repository-url : https://test.pypi.org/legacy/
40
40
skip-existing : true
41
-
42
- - name : Publish distribution π¦ to PyPI
43
- if : startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master'
44
- uses : pypa/gh-action-pypi-publish@release/v1
45
- with :
46
- password : ${{ secrets.PYPI_API_TOKEN }}
You canβt perform that action at this time.
0 commit comments