File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ name: Publish (reusable workflow)
33on :
44 workflow_call :
55 inputs :
6- version :
7- description : ' Version number or tag for the release. For example: v1.0.1'
8- required : true
9- type : string
106 release_notes :
117 description : ' Release notes'
128 required : true
1612 required : true
1713 type : string
1814 environment_name :
19- description : ' Name of environment that specifies PyPI/TestPyPI url'
15+ description : ' Name for PyPI/TestPyPI environment'
16+ type : string
17+ required : true
18+ environment_url :
19+ description : ' URL for PyPI/TestPyPI environment'
2020 type : string
2121 required : true
2222 secrets :
@@ -31,10 +31,13 @@ jobs:
3131 publish :
3232 name : Build
3333 runs-on : ubuntu-latest
34- environment : ${{ inputs.environment_name }}
34+ environment :
35+ name : ${{ inputs.environment_name }}
36+ url : ${{ inputs.environment_url }}
3537 env :
3638 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
3739 GITHUB_REPO : ${{ github.repository }}
40+ GITHUB_REFNAME : ${{ github.ref_name }}
3841
3942 steps :
4043 - name : Checkout repository
7376
7477 - name : Create GitHub Release
7578 env :
76- VERSION : ${{ inputs.version }}
7779 NOTES : ${{ inputs.release_notes }}
78- run : gh release create $VERSION --repo $GITHUB_REPO --notes $NOTES
80+ run : gh release create $GITHUB_REFNAME --repo $GITHUB_REPO --notes $NOTES
7981
8082 - name : Upload GitHub Release
81- env :
82- VERSION : ${{ inputs.version }}
83- run : gh release upload $VERSION dist/** --repo $GITHUB_REPO
83+ run : gh release upload $GITHUB_REFNAME dist/** --repo $GITHUB_REPO
Original file line number Diff line number Diff line change @@ -2,26 +2,18 @@ name: Publish to TestPyPI
22
33on :
44 workflow_dispatch :
5- inputs :
6- version :
7- description : ' Version name for release'
8- required : true
95
106jobs :
117 publish :
128 name : Publish wheel to TestPyPI
13- runs-on : ubuntu-latest
14- environment :
15- name : testpypi
16- url : https://test.pypi.org/p/seclab-taskflow-agent2
179 permissions :
1810 contents : write
1911 id-token : write # For trusted publishing
20- uses : .github/workflows/publish-reusable.yml@main
12+ uses : ./. github/workflows/publish-reusable.yml
2113 with :
22- version : ${{ inputs.version }}
2314 release_notes : ${{ github.head_ref }}
2415 repository_url : https://test.pypi.org/legacy/
25- environment : testpypi
16+ environment_name : testpypi
17+ environment_url : https://test.pypi.org/p/seclab-taskflow-agent2
2618 secrets :
2719 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments