Skip to content

Commit 9f03def

Browse files
committed
Automatically push to pypi
1 parent e3e3eed commit 9f03def

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ on:
1212
pull_request:
1313
branches: [main]
1414

15+
# Manual trigger for pushing to PyPI
16+
workflow_dispatch:
17+
inputs:
18+
deploy:
19+
description: "Upload wheels & sdist to PyPI?"
20+
required: true
21+
type: boolean
22+
default: false
23+
1524
jobs:
1625
build_sdist:
1726
name: Build source
@@ -57,4 +66,27 @@ jobs:
5766
uses: actions/upload-artifact@v4
5867
with:
5968
name: cibw-wheels-${{ matrix.os }}
60-
path: wheelhouse/*.whl
69+
path: wheelhouse/*.whl
70+
71+
upload_pypi:
72+
name: Upload to PyPI (manual trigger)
73+
needs: [build_sdist, build_wheels]
74+
runs-on: ubuntu-latest
75+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == 'true' }}
76+
77+
steps:
78+
- uses: actions/download-artifact@v4
79+
with:
80+
pattern: "*wheels*"
81+
merge-multiple: true
82+
83+
- name: Install Twine
84+
run: |
85+
python -m pip install --upgrade twine
86+
87+
- name: Upload to PyPI
88+
env:
89+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
90+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
91+
run: |
92+
twine upload --skip-existing *.whl *.tar.gz

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
44

55
[project]
66
name = "qoco"
7-
version = "0.2.0"
7+
version = "0.1.7"
88
description = "QOCO: Quadratic Objective Conic Optimizer"
99
readme = "README.md"
1010
requires-python = ">=3.8"

0 commit comments

Comments
 (0)