Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] migrate stable binaries release to github actions #1458

Merged
merged 19 commits into from
Dec 17, 2020
Merged
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/binaries-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Stable Releases

on:
push:
tags: ["v*"]
release:
types: [published]

jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: 3.7

- name: Install dependencies
shell: bash -l {0}
run: |
conda install -y pytorch torchvision cpuonly -c pytorch
pip install -r requirements-dev.txt
pip install --upgrade --no-cache-dir twine
python setup.py install

- name: Build and Publish Conda binaries
shell: bash -l {0}
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
UPLOAD_USER: "pytorch"
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: |
python setup.py sdist bdist_wheel
twine check dist/*
TWINE_USERNAME="${{ secrets.PYPI_USER }}" TWINE_PASSWORD="${{ secrets.PYPI_TOKEN }}" twine upload --verbose dist/*