File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 35
35
BUILD_CONFIGURATION : Release
36
36
FEEDZ_URI : https://f.feedz.io/forevolve/operationresults/nuget/index.json
37
37
ACTIONS_ALLOW_UNSECURE_COMMANDS : true
38
- IS_REPO_DISPATCH : ${{ github.event_name == 'repository_dispatch' }}
39
- IS_WORKFLOW_DISPATCH : ${{ github.event_name == 'workflow_dispatch' }}
40
- IS_NOT_DISPATCH : ${{ github.event_name != 'repository_dispatch' && github.event_name != 'workflow_dispatch' }}
41
38
42
39
jobs :
43
40
build-and-test :
@@ -46,10 +43,10 @@ jobs:
46
43
fail-fast : false
47
44
matrix :
48
45
dotnet : ['5.0.x']
46
+ env :
47
+ IS_NOT_DISPATCH : ${{ github.event_name != 'repository_dispatch' && github.event_name != 'workflow_dispatch' }}
49
48
50
49
steps :
51
- - run : echo -e "IS_REPO_DISPATCH:" ${{ env.IS_REPO_DISPATCH }} "\nIS_WORKFLOW_DISPATCH:" ${{ env.IS_WORKFLOW_DISPATCH }} "\nIS_NOT_DISPATCH:" ${{ env.IS_NOT_DISPATCH }}
52
-
53
50
- uses : actions/checkout@v1
54
51
if : env.IS_NOT_DISPATCH
55
52
74
71
fail-fast : true
75
72
matrix :
76
73
dotnet : ['5.0.x']
74
+ env :
75
+ PUSH_TO_FEEDZ : github.event_name == 'pull_request' || (github.event_name == 'repository_dispatch' && github.event.client_payload.feedz == true) || (github.event_name == 'workflow_dispatch' && github.event.inputs.deployToFeedz == 'true')
76
+ PUSH_TO_NUGET : github.event_name == 'push' || (github.event_name == 'repository_dispatch' && github.event.client_payload.nuget == true) || (github.event_name == 'workflow_dispatch' && github.event.inputs.deployToNuget == 'true')
77
77
78
78
steps :
79
79
- uses : actions/checkout@v1
94
94
95
95
- name : Push to feedz.io
96
96
run : dotnet nuget push **/*.nupkg -k ${{ secrets.FEEDZ_API_KEY }} -s ${{ env.FEEDZ_URI }}
97
- if : github.event_name == 'pull_request' || ( env.IS_REPO_DISPATCH && github.event.client_payload.feedz == true) || (env.IS_WORKFLOW_DISPATCH && github.event.inputs.deployToFeedz == 'true')
97
+ if : env.PUSH_TO_FEEDZ
98
98
99
99
- name : Push to NuGet.org
100
100
run : dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
101
- if : github.event_name == 'push' || ( env.IS_REPO_DISPATCH && github.event.client_payload.nuget == true) || (env.IS_WORKFLOW_DISPATCH && github.event.inputs.deployToNuget == 'true')
101
+ if : env.PUSH_TO_NUGET
You can’t perform that action at this time.
0 commit comments