File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,3 +124,24 @@ jobs:
124124 - name : Build the distribution
125125 run : |
126126 python -m build
127+
128+ - name : Upload to PyPI
129+ run : |
130+ twine upload dist/* --verbose
131+ env :
132+ TWINE_USERNAME : __token__
133+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
134+
135+ - name : Verify PyPI installation
136+ run : |
137+ # Create a temporary environment to test installation
138+ python -m venv prod_test_env
139+ source prod_test_env/bin/activate
140+ # Get the package name from the built distribution
141+ PACKAGE_NAME=$(ls dist/*.tar.gz | head -n 1 | sed 's/dist\///' | sed 's/-[0-9].*$//')
142+ # Wait for PyPI to index the package
143+ sleep 60
144+ # Install from PyPI
145+ pip install $PACKAGE_NAME
146+ # Basic import test
147+ python -c "import flixOpt; print('PyPI installation successful!')"
You can’t perform that action at this time.
0 commit comments