12
12
description : ' HomeBrew prerelease'
13
13
default : ' false'
14
14
jobs :
15
+ token-validation :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - name : Validate REPO_ACCESS_TOKEN
19
+ uses : actions/checkout@v2
20
+ with :
21
+ repository : ' twilio/twilio-oai'
22
+ token : ${{ secrets.REPO_ACCESS_TOKEN }}
23
+ - name : Validate AWS tokens
24
+ uses : aws-actions/configure-aws-credentials@v1
25
+ with :
26
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
27
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
28
+ aws-session-token : ${{ secrets.AWS_SESSION_TOKEN }}
29
+ aws-region : us-east-1
15
30
notify-start :
31
+ needs : [ token-validation ]
16
32
name : Notify Release Started
17
33
runs-on : ubuntu-latest
18
34
steps :
32
48
SLACK_MESSAGE : ' Release Started :rocket:'
33
49
MSG_MINIMAL : actions url
34
50
test :
51
+ needs : [ token-validation ]
35
52
runs-on : ubuntu-latest
36
53
strategy :
37
54
matrix :
49
66
run : make test
50
67
update-api-specs :
51
68
runs-on : ubuntu-latest
69
+ needs : [ token-validation ]
52
70
# needs: [test]
53
71
outputs :
54
72
change-log : ${{ steps.update-specs.outputs.change-log }}
@@ -124,7 +142,7 @@ jobs:
124
142
REPO_NAME : twilio/twilio-cli
125
143
INPUTS : ' { "change-log": ${{ toJSON(needs.update-api-specs.outputs.change-log) }}, "version-type": "${{needs.update-api-specs.outputs.version-type}}", "homebrew-branch": "${{github.event.inputs.homebrew-branch}}", "homebrew-prerelease": "${{github.event.inputs.homebrew-prerelease}}" }'
126
144
notify-complete-fail :
127
- if : ${{ failure( ) || cancelled() }}
145
+ if : ${{ needs.token-validation.result != ' failure' && (failure( ) || cancelled() ) }}
128
146
needs : [ triggerCliWorkflow ]
129
147
name : Notify Release Failed
130
148
runs-on : ubuntu-latest
@@ -139,4 +157,4 @@ jobs:
139
157
SLACK_ICON_EMOJI : " :ship:"
140
158
SLACK_TITLE : " Twilio Cli-core"
141
159
SLACK_MESSAGE : ' Release workflow Failed'
142
- MSG_MINIMAL : actions url
160
+ MSG_MINIMAL : actions url
0 commit comments