File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : PyPI Nightly Build
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 0 0 * * *' # Runs at midnight UTC every day
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ build-and-publish :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ - name : Set up Python
14
+ uses : actions/setup-python@v4
15
+ with :
16
+ python-version : ' 3.x'
17
+ - name : Install dependencies
18
+ run : |
19
+ python -m pip install --upgrade pip
20
+ pip install setuptools wheel twine
21
+ - name : Get current date
22
+ id : date
23
+ run : echo "::set-output name=date::$(date +'%Y%m%d')"
24
+ - name : Build package
25
+ run : |
26
+ version=$(python setup.py --version)
27
+ new_version="${version}.dev${{ steps.date.outputs.date }}"
28
+ sed -i "s/version=.*/version='${new_version}',/" setup.py
29
+ python setup.py sdist bdist_wheel
30
+ - name : Publish package to PyPI
31
+ uses : pypa/gh-action-pypi-publish@release/v1
32
+ with :
33
+ user : __token__
34
+ password : ${{ secrets.PYPI_API_TOKEN }}
35
+ repository_url : https://pypi.org/project/torchao-nightly/
36
+ packages_dir : dist/
You can’t perform that action at this time.
0 commit comments