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 1
1
name : " Release Slack Bot"
2
2
description : " Release Slack Bot"
3
3
inputs :
4
+ release-tag :
5
+ required : true
6
+ description : " Release tag"
4
7
slack-token :
5
8
required : true
6
9
description : " Slack token"
13
16
method : chat.postMessage
14
17
token : ${{ inputs.slack-token }}
15
18
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 ) }}
17
20
channel: "#release"
18
21
icon_emoji: "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
19
22
text: |
Original file line number Diff line number Diff line change 9
9
name : Semantic version
10
10
runs-on : ubuntu-latest
11
11
outputs :
12
- tag : ${{ steps.semantic.outputs.git-tag }}
12
+ release- tag : ${{ steps.semantic.outputs.git-tag }}
13
13
permissions :
14
14
checks : read # to wait for required checks
15
15
contents : write # to be able to publish a GitHub release
@@ -36,11 +36,11 @@ jobs:
36
36
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37
37
38
38
release :
39
- if : ${{ needs.semantic-version.outputs.tag }}
39
+ if : ${{ needs.semantic-version.outputs.release- tag }}
40
40
needs : semantic-version
41
41
uses : ./.github/workflows/release.yml
42
42
permissions :
43
43
contents : write
44
44
secrets : inherit
45
45
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
3
3
on :
4
4
workflow_call :
5
5
inputs :
6
- tag :
6
+ release- tag :
7
7
required : true
8
8
type : string
9
9
description : Tag to release
13
13
# tag:
14
14
# required: true
15
15
# type: string
16
- # description: Tag to release # TODO: create if it does not exist
16
+ # description: Tag to release
17
17
push :
18
18
tags :
19
19
- v*
51
51
- uses : actions/checkout@v4
52
52
with :
53
53
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 }}
55
55
56
56
- name : Install UV
57
57
uses : astral-sh/setup-uv@v5.2
80
80
path : ./wheelhouse/*.whl
81
81
82
82
release :
83
- if : ${{ inputs.tag || startsWith(github.ref, 'refs/tags/') }}
83
+ if : ${{ inputs.release- tag || startsWith(github.ref, 'refs/tags/') }}
84
84
needs : build
85
85
runs-on : ubuntu-latest
86
86
environment : release
@@ -108,7 +108,7 @@ jobs:
108
108
id : github-release
109
109
uses : softprops/action-gh-release@v2
110
110
with :
111
- tag_name : ${{ inputs.tag || github.ref_name }}
111
+ tag_name : ${{ inputs.release- tag || github.ref_name }}
112
112
files : dist/*
113
113
fail_on_unmatched_files : true
114
114
generate_release_notes : ${{ startsWith(github.ref, 'refs/tags/') }}
@@ -117,5 +117,5 @@ jobs:
117
117
if : always()
118
118
uses : ./.github/actions/release-slack-bot
119
119
with :
120
- release-tag : ${{ github.ref_name }}
120
+ release-tag : ${{ inputs.release-tag || github.ref_name }}
121
121
slack-token : ${{ secrets.SLACK_BOT_TOKEN }}
You can’t perform that action at this time.
0 commit comments