File tree Expand file tree Collapse file tree 2 files changed +35
-5
lines changed Expand file tree Collapse file tree 2 files changed +35
-5
lines changed Original file line number Diff line number Diff line change @@ -163,14 +163,14 @@ jobs:
163
163
- name : Set snapshot environment
164
164
if : github.ref_name == 'main'
165
165
run : |
166
- echo "RELEASE_TYPE=snapshot" >> $GITHUB_ENV
167
- echo "RELEASE_ADDR=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV
166
+ echo "RELEASE_TYPE=' snapshot' " >> $GITHUB_ENV
167
+ echo "RELEASE_ADDR=' https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' " >> $GITHUB_ENV
168
168
169
- - name : Set release environment
169
+ - name : Set release draft environment
170
170
if : github.ref_type == 'tag'
171
171
run : |
172
- echo "RELEASE_TYPE=release" >> $GITHUB_ENV
173
- echo "RELEASE_ADDR=https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }} " >> $GITHUB_ENV
172
+ echo "RELEASE_TYPE=' release draft' " >> $GITHUB_ENV
173
+ echo "RELEASE_ADDR=' https://github.com/${{ github.repository }}/releases/' " >> $GITHUB_ENV
174
174
175
175
- name : Notify on success
176
176
if : needs.build.result == 'success' && needs.test.result == 'success' && (needs.release.result == 'success' || github.event_name == 'schedule')
Original file line number Diff line number Diff line change
1
+ name : Release Notify
2
+
3
+ on :
4
+ release :
5
+ types :
6
+ - published
7
+
8
+ jobs :
9
+ notify :
10
+ name : Send job complete notification
11
+ runs-on : ubuntu-latest
12
+ env :
13
+ PROJECT_NAME : ${{ needs.build.outputs.project_name }}
14
+ steps :
15
+ - name : Set release environment
16
+ if : github.ref_type == 'tag'
17
+ run : |
18
+ echo "RELEASE_TYPE='release'" >> $GITHUB_ENV
19
+ echo "RELEASE_ADDR='https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}'" >> $GITHUB_ENV
20
+
21
+ - name : Notify
22
+
23
+ with :
24
+ webhook_id : ${{ secrets.DISCORD_WEBHOOK_ID }}
25
+ webhook_token : ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
26
+ color : " #00FF00"
27
+ username : " ${{ env.PROJECT_NAME }} Release Bot"
28
+ message : >
29
+ An ${{ env.PROJECT_NAME }} ${{ env.RELEASE_TYPE }} was deployed by ${{ github.actor }}:
30
+ ${{ env.RELEASE_ADDR }}
You can’t perform that action at this time.
0 commit comments