Skip to content

Commit

Permalink
Restore build on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Bloemberg committed Feb 11, 2021
1 parent f9eae3d commit 303e8e0
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 27 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,3 @@ jobs:
- name: Test with tox
run: tox

release:
runs-on: ubuntu-latest

if: startsWith(github.ref, 'refs/tags')

needs: test

steps:
- uses: actions/checkout@master

- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: python -m pip install build --user

- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
61 changes: 61 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Tag

on:
push:
tags:
- '*'

jobs:
test:
runs-on: ubuntu-latest

strategy:
max-parallel: 5
matrix:
python-version:
- 2.7
- 3.6
- 3.7
- 3.8
- 3.9

steps:
- uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox

release:
runs-on: ubuntu-latest

needs: test

steps:
- uses: actions/checkout@master

- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: python -m pip install build --user

- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}

0 comments on commit 303e8e0

Please sign in to comment.