File tree Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Original file line number Diff line number Diff line change 33 release :
44 types : [published]
55 workflow_dispatch :
6+ inputs :
7+ tag_name :
8+ description : " Tag de la release"
9+ required : true
10+ html_url :
11+ description : " URL de la release"
12+ required : false
13+ description :
14+ description : " Description du message"
15+ required : false
16+ default : " Release triggered manually"
617
718jobs :
819 github-releases-to-discord :
1122 - name : Checkout
1223 uses : actions/checkout@v4
1324
25+ - name : Set release info
26+ id : vars
27+ run : |
28+ if [ "${{ github.event_name }}" = "release" ]; then
29+ echo "tag_name=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
30+ echo "html_url=${{ github.event.release.html_url }}" >> $GITHUB_OUTPUT
31+ echo "description=${{ github.event.release.body }}" >> $GITHUB_OUTPUT
32+ else
33+ echo "tag_name=${{ github.event.inputs.tag_name }}" >> $GITHUB_OUTPUT
34+ echo "html_url=${{ github.event.inputs.html_url || '' }}" >> $GITHUB_OUTPUT
35+ echo "description=${{ github.event.inputs.description }}" >> $GITHUB_OUTPUT
36+ fi
37+
1438 - name : Send Discord Release message
15- uses : SethCohen/github-releases-to -discord@v1
39+ uses : sarisia/actions-status -discord@v1
1640 with :
1741 username : " Sharp"
18- webhook_url : ${{ secrets.DISCORD_WEBHOOK_URL }}
19- color : ' 3447003'
42+ webhook : ${{ secrets.DISCORD_WEBHOOK_URL }}
43+ color : 0x007BFF
44+ title : " A new version of `code16/sharp` has been released!"
45+ url : ${{ steps.vars.outputs.html_url }}
46+ description : |
47+ Version `${{ steps.vars.outputs.tag_name }}`
48+ ${{ steps.vars.outputs.description }}
You can’t perform that action at this time.
0 commit comments