File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Python package
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - develop # Trigger the workflow on push events to the develop branch
7
+
8
+ jobs :
9
+ build-and-publish :
10
+ runs-on : ubuntu-latest
11
+ strategy :
12
+ matrix :
13
+ python-version : [3.8, 3.9, 3.10] # List of Python versions
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+ with :
17
+ fetch-depth : 0
18
+
19
+ - name : Set up Python ${{ matrix.python-version }}
20
+ uses : actions/setup-python@v4
21
+ with :
22
+ python-version : ${{ matrix.python-version }}
23
+
24
+ - name : Install dependencies
25
+ run : |
26
+ python -m pip install --upgrade pip
27
+ pip install setuptools wheel twine build
28
+
29
+ - name : Build package
30
+ run : |
31
+ python -m build
32
+
33
+ - name : Publish package
34
+ env :
35
+ TWINE_USERNAME : __token__
36
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
37
+ run : |
38
+ twine upload dist/*
You can’t perform that action at this time.
0 commit comments