Skip to content

Commit

Permalink
[CD] Deploy the package to PyPI server (#137)
Browse files Browse the repository at this point in the history
* 🚀 Add public pypi

* Fix version

* Fix workflow

* Fix workflow

* Fix version

* 🎨 Del mmcv

* Update .github/workflows/publish-to-pypi.yaml

Co-authored-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: YH <100389977+yhna940@users.noreply.github.com>

* Update .github/workflows/publish-to-pypi.yaml

Co-authored-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: YH <100389977+yhna940@users.noreply.github.com>

* 🔖 Change rc

* 🐛 typo

* Update .github/workflows/publish-to-pypi.yaml

Co-authored-by: Junhwa Song <ethan9867@gmail.com>
Signed-off-by: YH <100389977+yhna940@users.noreply.github.com>

* 🎨 Apply lint

* 🚀 Bump version

Signed-off-by: YH <100389977+yhna940@users.noreply.github.com>
Co-authored-by: Junhwa Song <ethan9867@gmail.com>
  • Loading branch information
yhna940 and KKIEEK authored Jan 11, 2023
1 parent 7bc1b70 commit 9a70d11
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ concurrency:

jobs:
build-n-publish:
runs-on: ["self-hosted", "linux", "docker", "ubuntu20.04", "python3"]
runs-on: ubuntu-latest
timeout-minutes: 20
if: startsWith(github.event.ref, 'refs/tags')
steps:
- name: checkout main
- name: Checkout main
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: update setuptools
run: pip3 install setuptools --upgrade
- name: make dist
python-version: 3.7
- name: Install dependent
run: pip install torch
- name: Install wheel
run: pip install wheel
- name: Build Siatune
run: |
python3 setup.py sdist
python setup.py sdist bdist_wheel
- name: publish distribution to PyPI
env:
PYPI_USER: ${{ secrets.PYPI_USER }}
PYPI_PW: ${{ secrets.PYPI_PW}}
PIP_INDEX_URL: ${{ secrets.PIP_INDEX_URL}}
run: |
pip3 install twine
twine upload --repository-url ${PIP_INDEX_URL} dist/* -u ${PYPI_USER} -p ${PYPI_PW}
pip install twine
twine upload dist/* -u ${{ secrets.PUBLIC_PYPI_USER }} -p ${{ secrets.PUBLIC_PYPI_PW }}
10 changes: 7 additions & 3 deletions siatune/version.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Copyright (c) SI-Analytics. All rights reserved.
__version__ = '0.3.0'
__version__ = '0.4.0rc0'
from typing import Tuple

import mmcv
try:
import mmcv
except ImportError:
mmcv = None

IS_DEPRECATED_MMCV = False

Expand All @@ -27,7 +30,8 @@ def parse_version_info(version_str: str) -> Tuple:
return tuple(version_info)


if (parse_version_info(mmcv.__version__) < parse_version_info('2.0.0rc0')):
if mmcv is not None and (parse_version_info(mmcv.__version__) <
parse_version_info('2.0.0rc0')):
IS_DEPRECATED_MMCV = True

version_info = parse_version_info(__version__)

0 comments on commit 9a70d11

Please sign in to comment.