Skip to content

Commit 7ded25a

Browse files
committed
publish on tag creation (#4)
1 parent 54e1616 commit 7ded25a

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@
44
name: Upload Python Package
55

66
on:
7-
release:
8-
types: [created]
7+
push:
8+
tags:
9+
- "v1.*.*"
910

1011
jobs:
1112
deploy:
12-
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: '3.x'
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine tox
25-
- name: Run Tests
26-
run: tox
27-
- name: Build and publish
28-
env:
29-
TWINE_USERNAME: __token__
30-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
31-
run: |
32-
python setup.py sdist bdist_wheel
33-
twine upload dist/*
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: "3.x"
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine tox
25+
- name: Run Tests
26+
run: tox
27+
- name: Build and publish
28+
env:
29+
TWINE_USERNAME: __token__
30+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
31+
run: |
32+
python setup.py sdist bdist_wheel
33+
twine upload dist/*

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist =
33
py{3.6,3.7,3.8,3.9},
4-
py3.8-{codestyle,mypy}
4+
py3.8-codestyle
55

66
[testenv]
77
install_command = python -m pip install --no-deps {opts} {packages}

0 commit comments

Comments
 (0)