Add release action, publish wheels on tag

This commit is contained in:
Vladan Popovic 2020-09-07 14:56:30 +02:00
parent 7c5da9bf58
commit e6933e227d
2 changed files with 37 additions and 0 deletions

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

@ -0,0 +1,34 @@
name: release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8]
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install tox
run: pip install tox
- name: Build release with tox
run: tox -e release
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/*
asset_content_type: application/zip

View File

@ -33,6 +33,9 @@ deps =
commands = commands =
sphinx-build -W -b html -E ./source/ ./build/html/ sphinx-build -W -b html -E ./source/ ./build/html/
[testenv:release]
commands = python setup.py bdist_wheel
[testenv:clean] [testenv:clean]
deps = coverage deps = coverage
skip_install = true skip_install = true