File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - " *"
7+ workflow_call : # can be triggered by other actions
8+ inputs :
9+ ref :
10+ required : true
11+ type : string
712
813jobs :
914 pypi :
1520 id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
1621 steps :
1722 - uses : actions/checkout@v4
23+ with :
24+ ref : ${{ inputs.ref || github.ref }}
1825 - uses : actions/setup-python@v5
1926 - run : pip install build twine && make dist
2027 - uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 1- name : Tag every commit
1+ name : Tag and Publish every commit
22
33on :
44 push :
55 branches :
66 - master
7+ - tag-every-commit
78
89jobs :
9- build :
10+ tag :
1011 runs-on : ubuntu-latest
12+ outputs :
13+ tag : ${{ steps.tag.outputs.new_tag }}
1114 permissions :
1215 contents : write
1316 steps :
1417 - uses : actions/checkout@v4
1518 with :
1619 fetch-depth : ' 0'
1720 - uses : anothrNick/github-tag-action@v1
21+ id : tag
1822 env :
19- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
20- TAG_PREFIX :
21- INITIAL_VERSION : 1.1.0
22- PRERELEASE : true
23- PRERELEASE_SUFFIX : a
23+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24+ CUSTOM_TAG : 1.0a${{ github.run_number }}
25+ publish :
26+ uses : ./.github/workflows/pypi.yml
27+ needs : tag
28+ with :
29+ ref : ${{ needs.tag.outputs.tag }}
You can’t perform that action at this time.
0 commit comments