From 1e993e6f8e642dce79285dc27abccb897f02352f Mon Sep 17 00:00:00 2001 From: Vladimir Magamedov Date: Fri, 20 Mar 2020 14:11:28 +0200 Subject: [PATCH] Added Release workflow --- .github/workflows/release.yaml | 23 ++++++++++++++++++++++ Makefile | 1 + requirements/release.in | 4 ++++ requirements/release.txt | 35 ++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 .github/workflows/release.yaml create mode 100644 requirements/release.in create mode 100644 requirements/release.txt diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..92183fd --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,23 @@ +name: Release +on: + push: + tags: ["v*"] +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: pip-${{ hashFiles('requirements/release.txt') }} }} + - uses: actions/setup-python@v1 + with: + python-version: 3.7 + - run: pip3 install -r requirements/release.txt + - run: pip3 install -e . + - run: make release + - run: twine upload dist/* + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} diff --git a/Makefile b/Makefile index 52fd097..849e58a 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,7 @@ reqs: pip-compile -U requirements/test.in pip-compile -U requirements/lint.in pip-compile -U requirements/check.in + pip-compile -U requirements/release.in server: @PYTHONPATH=examples python3 -m reflection.server diff --git a/requirements/release.in b/requirements/release.in new file mode 100644 index 0000000..c84d91f --- /dev/null +++ b/requirements/release.in @@ -0,0 +1,4 @@ +-r ../setup.txt +twine +grpcio-tools +mypy-protobuf diff --git a/requirements/release.txt b/requirements/release.txt new file mode 100644 index 0000000..189f2cc --- /dev/null +++ b/requirements/release.txt @@ -0,0 +1,35 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile requirements/release.in +# +bleach==3.1.3 # via readme-renderer +certifi==2019.11.28 # via requests +chardet==3.0.4 # via requests +docutils==0.16 # via readme-renderer +grpcio-tools==1.27.2 # via -r requirements/release.in +grpcio==1.27.2 # via grpcio-tools +h2==3.1.1 # via -r requirements/../setup.txt +hpack==3.0.0 # via -r requirements/../setup.txt, h2 +hyperframe==5.2.0 # via -r requirements/../setup.txt, h2 +idna==2.9 # via requests +importlib-metadata==1.5.0 # via keyring, twine +keyring==21.2.0 # via twine +multidict==4.6.1 # via -r requirements/../setup.txt +mypy-protobuf==1.19 # via -r requirements/release.in +pkginfo==1.5.0.1 # via twine +protobuf==3.11.3 # via grpcio-tools, mypy-protobuf +pygments==2.6.1 # via readme-renderer +readme-renderer==25.0 # via twine +requests-toolbelt==0.9.1 # via twine +requests==2.23.0 # via requests-toolbelt, twine +six==1.14.0 # via bleach, grpcio, protobuf, readme-renderer +tqdm==4.43.0 # via twine +twine==3.1.1 # via -r requirements/release.in +urllib3==1.25.8 # via requests +webencodings==0.5.1 # via bleach +zipp==3.1.0 # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +# setuptools