File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
actions/release-slack-bot Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 11name : " Release Slack Bot"
22description : " Release Slack Bot"
33inputs :
4+ release-tag :
5+ required : true
6+ description : " Release tag"
47 slack-token :
58 required : true
69 description : " Slack token"
1316 method : chat.postMessage
1417 token : ${{ inputs.slack-token }}
1518 payload : |
16- username: ${{ job.status == 'success' && format('Released codegen@{0}', github.ref_name ) || format('Failed to release codegen@{0}', github.ref_name ) }}
19+ username: ${{ job.status == 'success' && format('Released codegen@{0}', inputs.release-tag ) || format('Failed to release codegen@{0}', inputs.release-tag ) }}
1720 channel: "#release"
1821 icon_emoji: "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
1922 text: |
Original file line number Diff line number Diff line change 99 name : Semantic version
1010 runs-on : ubuntu-latest
1111 outputs :
12- tag : ${{ steps.semantic.outputs.git-tag }}
12+ release- tag : ${{ steps.semantic.outputs.git-tag }}
1313 permissions :
1414 checks : read # to wait for required checks
1515 contents : write # to be able to publish a GitHub release
@@ -36,11 +36,11 @@ jobs:
3636 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3737
3838 release :
39- if : ${{ needs.semantic-version.outputs.tag }}
39+ if : ${{ needs.semantic-version.outputs.release- tag }}
4040 needs : semantic-version
4141 uses : ./.github/workflows/release.yml
4242 permissions :
4343 contents : write
4444 secrets : inherit
4545 with :
46- tag : ${{ needs.semantic-version.outputs.tag }}
46+ release- tag : ${{ needs.semantic-version.outputs.release- tag }}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Build & Release
33on :
44 workflow_call :
55 inputs :
6- tag :
6+ release- tag :
77 required : true
88 type : string
99 description : Tag to release
1313 # tag:
1414 # required: true
1515 # type: string
16- # description: Tag to release # TODO: create if it does not exist
16+ # description: Tag to release
1717 push :
1818 tags :
1919 - v*
5151 - uses : actions/checkout@v4
5252 with :
5353 fetch-depth : 0
54- ref : ${{ inputs.tag || github.event.pull_request.head.ref || github.ref }}
54+ ref : ${{ inputs.release- tag || github.event.pull_request.head.ref || github.ref }}
5555
5656 - name : Install UV
5757 uses : astral-sh/setup-uv@v5.2
8080 path : ./wheelhouse/*.whl
8181
8282 release :
83- if : ${{ inputs.tag || startsWith(github.ref, 'refs/tags/') }}
83+ if : ${{ inputs.release- tag || startsWith(github.ref, 'refs/tags/') }}
8484 needs : build
8585 runs-on : ubuntu-latest
8686 environment : release
@@ -108,7 +108,7 @@ jobs:
108108 id : github-release
109109 uses : softprops/action-gh-release@v2
110110 with :
111- tag_name : ${{ inputs.tag || github.ref_name }}
111+ tag_name : ${{ inputs.release- tag || github.ref_name }}
112112 files : dist/*
113113 fail_on_unmatched_files : true
114114 generate_release_notes : ${{ startsWith(github.ref, 'refs/tags/') }}
@@ -117,5 +117,5 @@ jobs:
117117 if : always()
118118 uses : ./.github/actions/release-slack-bot
119119 with :
120- release-tag : ${{ github.ref_name }}
120+ release-tag : ${{ inputs.release-tag || github.ref_name }}
121121 slack-token : ${{ secrets.SLACK_BOT_TOKEN }}
You can’t perform that action at this time.
0 commit comments