File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - ' *'
7-
7+ tags :
8+ - ' *'
89jobs :
910 tox :
1011 name : Run Tox python-${{ matrix.version }}
@@ -36,28 +37,13 @@ jobs:
3637 - name : Run tox checks
3738 run : tox
3839
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-
5440 publish :
5541 name : Upload package to PYPI
5642 runs-on : ubuntu-24.04
5743
58- needs : check_branch
44+ needs : tox
5945
60- if : needs.check_branch.outputs.is_main == 'true'
46+ if : startsWith(github.ref, 'refs/tags/')
6147
6248 environment :
6349 name : pypi
You can’t perform that action at this time.
0 commit comments