-
-
Notifications
You must be signed in to change notification settings - Fork 620
58 lines (50 loc) · 1.88 KB
/
binaries-nightly-release.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
47
48
49
50
51
52
53
54
55
56
57
58
name: Nightly Releases
on:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onschedule
schedule:
# Run at 00:00 UTC Every Day
- cron: "0 0 * * *"
jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: 3.8
- name: Setup nightly version
run: |
sed -i "s/__version__ = \"\(.*\)\"/__version__ = \"\1.dev$(date -u +%Y%m%d)\"/g" ignite/__init__.py
cat ignite/__init__.py
- name: Install dependencies
shell: bash -l {0}
run: |
conda install -y pytorch torchvision cpuonly -c pytorch-nightly
pip install -r requirements-dev.txt
- name: Build and Publish Conda binaries
shell: bash -l {0}
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
UPLOAD_USER: "pytorch-nightly"
run: |
chmod +x ./conda.recipe/build_and_upload.sh
./conda.recipe/build_and_upload.sh
- name: Build and Publish PyPi binaries
shell: bash -l {0}
run: |
# workaround to fix https://github.com/pytorch/ignite/issues/2373
pip uninstall -y twine pkginfo
pip install --upgrade --no-cache-dir twine 'pkginfo>=1.8.2'
python setup.py sdist bdist_wheel
twine --version
twine check dist/*
TWINE_USERNAME="${{ secrets.PYPI_USER }}" TWINE_PASSWORD="${{ secrets.PYPI_TOKEN }}" twine upload --verbose dist/*
- uses: JasonEtco/create-an-issue@v2
name: Create issue if nightly releases failed
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/failed_schedule_issue_template.md