Skip to content

Commit 05712aa

Browse files
authored
Add Github action to publish nightly to PyPi (#8)
1 parent e4ba45d commit 05712aa

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/nightly.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Nightly
2+
3+
on:
4+
workflow_dispatch: # To Generate wheels on demand outside of schedule.
5+
schedule:
6+
- cron: '0 3 * * *' # run at 3 AM UTC / 8 PM PDT
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
run-test-for-nightly:
13+
uses: ./.github/workflows/actions.yml
14+
nightly:
15+
name: Build Wheel file and upload
16+
needs: [run-test-for-nightly]
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: 3.9
24+
- name: Get pip cache dir
25+
id: pip-cache
26+
run: |
27+
python -m pip install --upgrade pip setuptools
28+
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
29+
- name: pip cache
30+
uses: actions/cache@v4
31+
with:
32+
path: ${{ steps.pip-cache.outputs.dir }}
33+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
34+
restore-keys: |
35+
${{ runner.os }}-pip-
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip setuptools
39+
pip install twine
40+
pip install -r requirements.txt --progress-bar off
41+
- name: Build wheel file
42+
run: |
43+
python pip_build.py --nightly
44+
- name: Publish KerasRS Nightly to PyPI
45+
uses: pypa/gh-action-pypi-publish@release/v1
46+
with:
47+
password: ${{ secrets.PYPI_NIGHTLY_API_TOKEN }}
48+
verbose: true

0 commit comments

Comments
 (0)