File tree Expand file tree Collapse file tree 2 files changed +47
-1
lines changed
Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to PyPI
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ deployments : write
10+ packages : write
11+ repository-projects : read
12+ contents : read
13+ id-token : write
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ steps :
19+ # Checkout the code
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+
23+ # Set up Python
24+ - name : Set up Python
25+ uses : actions/setup-python@v4
26+ with :
27+ python-version : ' 3.10'
28+
29+ # Install dependencies
30+ - name : Install dependencies
31+ run : |
32+ python -m pip install --upgrade pip
33+ pip install setuptools wheel twine
34+
35+ # Build the distribution
36+ - name : Build distribution
37+ run : |
38+ CURRENT_TAG=$(git describe --tags --abbrev=0)
39+ VERSION=${CURRENT_TAG#v} # Remove 'v' from the tag
40+ sed -i "s/version=\"[^\"]*\"/version=\"$VERSION\"/" setup.py
41+ python setup.py sdist bdist_wheel
42+
43+ # Upload the distribution to PyPI
44+ - name : Upload to PyPI
45+ run : |
46+ twine upload dist/*
Original file line number Diff line number Diff line change 22
33setup (
44 name = 'adaup' ,
5- version = '0.1.0 ' ,
5+ version = '0.1.1 ' ,
66 packages = ['adaup' ],
77 package_dir = {'' : 'src' },
88 install_requires = [
You can’t perform that action at this time.
0 commit comments