From 364d22361840069545c9271c3bd55525d6702224 Mon Sep 17 00:00:00 2001 From: Keita Mizukoshi Date: Wed, 24 Nov 2021 19:08:06 +0100 Subject: [PATCH] Publish on GitHub --- .github/workflows/python-publish.yml | 26 ++++++++++++++++++++++++++ make.sh | 5 +---- rubis/__init__.py | 2 +- rubis/cli.py | 2 +- 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..f1cdc3e --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,26 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{secrets.PYPIUSER}} + TWINE_PASSWORD: ${{secrets.PYPIPASS}} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/make.sh b/make.sh index 8d3031e..aa406e8 100755 --- a/make.sh +++ b/make.sh @@ -7,7 +7,4 @@ python3 setup.py bdist_wheel echo Done. echo local install -echo 'python3 -m pip install dist/rubis-0.7.0-py3-none-any.whl --upgrade' - -echo upload pypi -echo 'python3 -m twine upload --repository pypi dist/*' +echo 'python3 -m pip install dist/rubis-*.whl --upgrade' diff --git a/rubis/__init__.py b/rubis/__init__.py index f390105..75c5b58 100644 --- a/rubis/__init__.py +++ b/rubis/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.7.0' +__version__ = '0.7.1' from .cli import main from .hash import deterministic_hash diff --git a/rubis/cli.py b/rubis/cli.py index e4d531f..dbf82cf 100644 --- a/rubis/cli.py +++ b/rubis/cli.py @@ -35,7 +35,7 @@ def main(): parser.add_argument('-v', '--version', action='store_true') args = parser.parse_args() - version = '0.7.0' + version = '0.7.1' if args.version: print('rubis version : ' + version) return