Added Release workflow

This commit is contained in:
Vladimir Magamedov 2020-03-20 14:11:28 +02:00
parent 81be7d57a9
commit 1e993e6f8e
4 changed files with 63 additions and 0 deletions

23
.github/workflows/release.yaml vendored Normal file
View File

@ -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 }}

View File

@ -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

4
requirements/release.in Normal file
View File

@ -0,0 +1,4 @@
-r ../setup.txt
twine
grpcio-tools
mypy-protobuf

35
requirements/release.txt Normal file
View File

@ -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