File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1313 dist_tag :
1414 required : true
1515 type : string
16+ enableFailureNotification :
17+ description : ' Whether to notify the team on Discord when the release fails. Useful if this workflow is called from an automation.'
18+ required : false
19+ type : boolean
1620 secrets :
21+ DISCORD_WEBHOOK_URL :
22+ description : ' Discord webhook URL to notify on failure. Only required if enableFailureNotification is true.'
23+ required : false
1724 GH_TOKEN :
1825 required : true
1926 NPM_TOKEN :
5865 GH_TOKEN=${{ secrets.GH_TOKEN }} scripts/release/prepare-release-from-ci.js --skipTests -r ${{ inputs.release_channel }} --commit=${{ inputs.commit_sha }}
5966 cp ./scripts/release/ci-npmrc ~/.npmrc
6067 scripts/release/publish.js --ci --tags ${{ inputs.dist_tag }}
68+ - name : Notify Discord on failure
69+ if : failure() && inputs.enableFailureNotification == true
70+ uses : tsickert/discord-webhook@86dc739f3f165f16dadc5666051c367efa1692f4
71+ with :
72+ webhook-url : ${{ secrets.DISCORD_WEBHOOK_URL }}
73+ embed-author-name : " GitHub Actions"
74+ embed-title : ' Publish of $${{ inputs.release_channel }} release failed'
75+ embed-url : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}
Original file line number Diff line number Diff line change 2121 commit_sha : ${{ github.sha }}
2222 release_channel : stable
2323 dist_tag : canary,next
24+ enableFailureNotification : true
2425 secrets :
26+ DISCORD_WEBHOOK_URL : ${{ secrets.DISCORD_WEBHOOK_URL }}
2527 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
2628 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2729
4042 commit_sha : ${{ github.sha }}
4143 release_channel : experimental
4244 dist_tag : experimental
45+ enableFailureNotification : true
4346 secrets :
47+ DISCORD_WEBHOOK_URL : ${{ secrets.DISCORD_WEBHOOK_URL }}
4448 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
4549 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments