Skip to content

Commit 3ed869d

Browse files
committed
global: fix gh actions to release on tag
1 parent 8296cbb commit 3ed869d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/build-and-release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@ name: Build and release
33
on:
44
push:
55
branches: [master]
6-
tags:
7-
- "*"
86
pull_request:
97
branches: [master]
8+
release:
9+
types: [published]
1010

1111
jobs:
1212
Test:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
1616
python-version: [2.7, 3.6]
17-
1817
steps:
1918
- name: Checkout
2019
uses: actions/checkout@v2
@@ -41,12 +40,12 @@ jobs:
4140
./run-tests.sh
4241
4342
- name: Build package
44-
if: ${{ success() && github.event_name == 'push' && matrix.python-version == '3.6' }}
43+
if: ${{ success() && github.event_name == 'release' && matrix.python-version == '3.6' }}
4544
run: |
4645
python setup.py sdist bdist_wheel
4746
4847
- name: Publish package
49-
if: ${{ success() && github.event_name == 'push' && matrix.python-version == '3.6' }}
48+
if: ${{ success() && github.event_name == 'release' && matrix.python-version == '3.6' }}
5049
uses: pypa/[email protected]
5150
with:
5251
user: __token__

0 commit comments

Comments
 (0)