Skip to content

Ant Ray PyPi Nightly #8

Ant Ray PyPi Nightly

Ant Ray PyPi Nightly #8

Workflow file for this run

name: Ant Ray PyPi Nightly
on:
schedule:
- cron: '0 0 * * *'
# can manually trigger the workflow
workflow_dispatch:
jobs:
build-and-publish:
# do not run in forks
if: ${{ github.repository_owner == 'antgroup' }}
name: build wheel and upload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: days since the commit date
run: |
:
timestamp=$(git log --no-walk --date=unix --format=%cd $GITHUB_SHA)
days=$(( ( $(date --utc +%s) - $timestamp ) / 86400 ))
if [ $days -eq 0 ]; then
echo COMMIT_TODAY=true >> $GITHUB_ENV
fi
- name: Build wheel
if: env.COMMIT_TODAY == 'true'
env:
RAY_DEBUG_BUILD: nightly
run: |
cd python
python setup.py bdist_wheel -d dist
- name: Upload
if: env.COMMIT_TODAY == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: python/dist
password: ${{ secrets.PYPI_API_TOKEN }}