From e6933e227d592ccb8a00a70a42c2b464c5753ec4 Mon Sep 17 00:00:00 2001 From: Vladan Popovic Date: Mon, 7 Sep 2020 14:56:30 +0200 Subject: [PATCH] Add release action, publish wheels on tag --- .github/workflows/release.yaml | 34 ++++++++++++++++++++++++++++++++++ tox.ini | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3c9a9a5 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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 diff --git a/tox.ini b/tox.ini index cd9e0f0..938e46e 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,9 @@ deps = commands = sphinx-build -W -b html -E ./source/ ./build/html/ +[testenv:release] +commands = python setup.py bdist_wheel + [testenv:clean] deps = coverage skip_install = true