File tree Expand file tree Collapse file tree 1 file changed +24
-5
lines changed
Expand file tree Collapse file tree 1 file changed +24
-5
lines changed Original file line number Diff line number Diff line change 1- name : build an publish
1+ name : ' Build an push to pypi '
22
33on :
44 push :
5- branches :
6- - release
5+ tags :
6+ - " * "
77 workflow_dispatch :
88
99jobs :
10- build-and-publish :
11- name : build an publish
10+ validate-branch :
1211 runs-on : ubuntu-latest
12+ outputs :
13+ branch : ${{ steps.check_step.outputs.branch }}
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Get current branch
21+ id : check_step
22+ run : |
23+ raw=$(git branch -r --contains ${{ github.ref }})
24+ branch=${raw##*/}
25+ echo "branch=$branch" >> $GITHUB_OUTPUT
26+ echo "Commit on branch: $branch."
27+
28+ push-pypi :
29+ runs-on : ubuntu-latest
30+ needs : validate-branch
31+ if : contains(${{ needs.check.outputs.branch }}, 'main')`
1332 steps :
1433 - uses : actions/checkout@v4
1534 - name : Set up Python 3.8
You can’t perform that action at this time.
0 commit comments