File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Manual publish to PyPI
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : Git tag to publish
8+ required : true
9+ type : string
10+ python-version :
11+ description : Python version to use for build
12+ required : false
13+ default : ' 3.10'
14+ type : string
15+
16+ jobs :
17+ publish_package :
18+ name : Publish package
19+ runs-on : ubuntu-latest
20+ permissions :
21+ contents : read
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+ with :
26+ ref : ${{ inputs.tag }}
27+
28+ - name : Set up Python
29+ uses : actions/setup-python@v5
30+ with :
31+ python-version : ${{ inputs.python-version }}
32+
33+ - name : Install dependencies
34+ run : |
35+ pip install ninja packaging wheel twine
36+ pip install setuptools==75.8.0
37+ pip install torch --index-url https://download.pytorch.org/whl/cpu
38+
39+ - name : Build core package
40+ env :
41+ FLASH_DMATTN_SKIP_CUDA_BUILD : " TRUE"
42+ run : |
43+ python setup.py sdist --dist-dir=dist
44+ ls -l dist
45+
46+ - name : Deploy
47+ env :
48+ TWINE_USERNAME : " __token__"
49+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
50+ run : |
51+ if [ -z "$TWINE_PASSWORD" ]; then
52+ echo "::error::PYPI_API_TOKEN secret not set; aborting publish."; exit 1
53+ fi
54+ python -m twine upload dist/*
You can’t perform that action at this time.
0 commit comments