Skip to content

Commit

Permalink
[ci] migrate stable binaries release to github actions (#1458)
Browse files Browse the repository at this point in the history
* Update setup.cfg

* [ci] create binaries-release.yml

* align with nightly release

* Update binaries-release.yml

* Update binaries-release.yml

* merge master

* Update binaries-release.yml

* Update docs.yml

Co-authored-by: vfdev <[email protected]>
  • Loading branch information
Jeff Yang and vfdev-5 authored Dec 17, 2020
1 parent 8c286af commit 0788f2a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/binaries-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Stable Releases

on:
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/*
1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Build docs
on:
push:
branches: [master]
tags: ["v*"]
release:
types: [published]

Expand Down

0 comments on commit 0788f2a

Please sign in to comment.