-
Notifications
You must be signed in to change notification settings - Fork 1.6k
46 lines (38 loc) · 1.09 KB
/
release-nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Publish tfds-nightly to PyPI
on:
# Event triggered daily at 00:30 am UTC
schedule:
- cron: '30 0 * * *'
# Event manually triggered (in the Github UI)
workflow_dispatch:
inputs:
git-ref:
description: Git ref (e.g. SHA or tag) (Optional)
default: ""
required: false
jobs:
publish-job:
# Prevents action from running on forks.
if: github.repository == 'tensorflow/datasets'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.git-ref }}
- name: Setup Python.
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install deps.
run: pip install setuptools wheel twine
- name: Create the source distribution and build the wheels.
run: |
python setup.py sdist --nightly
python setup.py bdist_wheel --nightly
- name: Publish the package.
run: |
twine check dist/*
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.NIGHTLY_PYPI_PASSWORD }}