File tree 1 file changed +36
-0
lines changed 1 file changed +36
-0
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 to PyPI
6
+ runs-on : ubuntu-latest
7
+ steps :
8
+ - uses : actions/checkout@master
9
+ - name : Set up Python 3.10
10
+ uses : actions/setup-python@v3
11
+ with :
12
+ python-version : " 3.10"
13
+ - name : Install pypa/build
14
+ run : >-
15
+ python -m
16
+ pip install
17
+ build
18
+ --user
19
+ - name : Build a binary wheel and a source tarball
20
+ run : >-
21
+ python -m
22
+ build
23
+ --sdist
24
+ --wheel
25
+ --outdir dist/
26
+ .
27
+ - name : Publish to Test PyPI
28
+ uses : pypa/gh-action-pypi-publish@release/v1
29
+ with :
30
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
31
+ repository_url : https://test.pypi.org/legacy/
32
+ - name : Publish to PyPI
33
+ if : startsWith(github.ref, 'refs/tags')
34
+ uses : pypa/gh-action-pypi-publish@release/v1
35
+ with :
36
+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments