Skip to content

Commit 1e24ca9

Browse files
committed
updated workflow
1 parent 3356887 commit 1e24ca9

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

.github/workflows/build_test_publish.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- '*'
7+
tags:
8+
- '*'
79

810
jobs:
911
tox:
@@ -36,28 +38,13 @@ jobs:
3638
- name: Run tox checks
3739
run: tox
3840

39-
check_branch:
40-
name: Check if the current branch is able to upload to PYPI
41-
runs-on: ubuntu-24.04
42-
43-
needs: tox
44-
45-
outputs:
46-
is_main: ${{ steps.check.outputs.is_main }}
47-
48-
steps:
49-
- name: check is main
50-
id: check
51-
# from: https://stackoverflow.com/questions/60589373/how-to-force-job-to-exit-in-github-actions-step
52-
run: echo "is_main=${{ github.ref == 'refs/heads/main' }}" >> $GITHUB_OUTPUT
53-
5441
publish:
5542
name: Upload package to PYPI
5643
runs-on: ubuntu-24.04
5744

58-
needs: check_branch
45+
needs: tox
5946

60-
if: needs.check_branch.outputs.is_main == 'true'
47+
if: startsWith(github.ref, 'refs/tags/')
6148

6249
environment:
6350
name: pypi

0 commit comments

Comments
 (0)