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 : Upload Python Package to PyPi
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+
8
+ permissions :
9
+ contents : read
10
+
11
+ jobs :
12
+ deploy :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ - name : Set up Python
17
+ uses : actions/setup-python@v3
18
+ with :
19
+ python-version : ' 3.x'
20
+ - name : Install dependencies
21
+ run : |
22
+ python -m pip install --upgrade pip
23
+ pip install poetry==1.8.3
24
+ poetry config pypi-token.pypi ${{ secrets.PYPI_PUBLISH_TOKEN }}
25
+ - name : Extract version from tag
26
+ id : extract_version
27
+ run : |
28
+ echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
29
+ echo ${TAG_NAME}
30
+ - name : Update version in pyproject.toml
31
+ run : |
32
+ sed -i "s/^version = .*/version = \"$TAG_NAME\"/" pyproject.toml
33
+ - name : Build package
34
+ run : poetry build
35
+ - name : Publish package
36
+ run : poetry publish
You can’t perform that action at this time.
0 commit comments