File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 55 tags :
66 - " *"
77 workflow_call : # can be triggered by other actions
8+ inputs :
9+ ref :
10+ required : true
11+ type : string
812
913jobs :
1014 pypi :
1620 id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
1721 steps :
1822 - uses : actions/checkout@v4
23+ with :
24+ ref : ${{ inputs.ref || github.ref }}
1925 - uses : actions/setup-python@v5
2026 - run : pip install build twine && make dist
2127 - 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 :
99jobs :
1010 tag :
1111 runs-on : ubuntu-latest
12+ outputs :
13+ tag : ${{ steps.tag.outputs.new_tag }}
1214 permissions :
1315 contents : write
16+ environment :
17+ name : pypi
18+ url : https://pypi.org/p/sphinxnotes-project
1419 steps :
1520 - uses : actions/checkout@v4
1621 with :
1722 fetch-depth : ' 0'
1823 - uses : anothrNick/github-tag-action@v1
24+ id : tag
1925 env :
2026 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2127 CUSTOM_TAG : 1.0a${{ github.run_number }}
2228 publish :
2329 uses : ./.github/workflows/pypi.yml
2430 needs : tag
2531 with :
26- github_ref : 1.0a ${{ github.run_number }}
32+ ref : ${{ needs.tag.outputs.tag }}
You can’t perform that action at this time.
0 commit comments