Skip to content

Commit 1578e03

Browse files
committed
ci: publish only on tag
1 parent a2f63c9 commit 1578e03

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# See https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
22
name: Publish Python distribution to PyPI
33

4-
on: push
4+
on:
5+
push:
6+
tags:
7+
- '*' # Push events to every tag not containing /
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
512

613
jobs:
714
build:
@@ -31,7 +38,7 @@ jobs:
3138
publish-to-pypi:
3239
name: >-
3340
Publish Python distribution to PyPI
34-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
41+
# if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3542
needs:
3643
- build
3744
runs-on: ubuntu-latest

.github/workflows/tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
- 'docs/**'
1515
- '*.md'
1616
- '*.rst'
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
1722
jobs:
1823
tests:
1924
name: ${{ matrix.name }}

0 commit comments

Comments
 (0)