File tree 4 files changed +27
-27
lines changed
ADotNet/Models/Pipelines/GithubPipelines/DotNets
ADotNet.Infrastructure.Build
4 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 15
15
IS_RELEASE_CANDIDATE : >-
16
16
${{
17
17
(
18
- github.event_name == 'pull_request' &&
19
- startsWith(github.event.pull_request.title, 'RELEASES:') &&
18
+ github.event_name == 'pull_request' &&
19
+ startsWith(github.event.pull_request.title, 'RELEASES:') &&
20
20
contains(github.event.pull_request.labels.*.name, 'RELEASES')
21
21
)
22
22
||
23
23
(
24
- github.event_name == 'push' &&
25
- startsWith(github.event.head_commit.message, 'RELEASES:') &&
24
+ github.event_name == 'push' &&
25
+ startsWith(github.event.head_commit.message, 'RELEASES:') &&
26
26
startsWith(github.ref_name, 'RELEASE')
27
27
)
28
28
}}
@@ -57,15 +57,15 @@ jobs:
57
57
58
58
contains(github.event.pull_request.labels.*.name, 'RELEASES')
59
59
steps :
60
+ - name : Checkout code
61
+ uses : actions/checkout@v3
62
+ with :
63
+ token : ${{ secrets.PAT_FOR_TAGGING }}
60
64
- name : Configure Git
61
65
run : >-
62
66
git config user.name "GitHub Action"
63
67
64
68
git config user.email "[email protected] "
65
- - name : Checkout code
66
- uses : actions/checkout@v3
67
- with :
68
- token : ${{ secrets.PAT_FOR_TAGGING }}
69
69
- name : Extract Version
70
70
run : >-
71
71
version_number=$(awk -v RS='' -F'</?Version>' 'NF>1{print $2}' ADotNet/ADotNet.csproj | sed -e 's/^[[:space:]]*//')
Original file line number Diff line number Diff line change @@ -95,19 +95,14 @@ static void Main(string[] args)
95
95
Needs = new string [ ] { "build" } ,
96
96
97
97
If =
98
- "needs.build.result == 'success' &&" + Environment . NewLine
99
- + "github.event.pull_request.merged &&" + Environment . NewLine
100
- + "github.event.pull_request.base.ref == 'master' &&" + Environment . NewLine
101
- + "startsWith(github.event.pull_request.title, 'RELEASES:') &&" + Environment . NewLine
102
- + "contains(github.event.pull_request.labels.*.name, 'RELEASES')" ,
98
+ $ "needs.build.result == 'success' && { Environment . NewLine } "
99
+ + $ "github.event.pull_request.merged && { Environment . NewLine } "
100
+ + $ "github.event.pull_request.base.ref == 'master' && { Environment . NewLine } "
101
+ + $ "startsWith(github.event.pull_request.title, 'RELEASES:') && { Environment . NewLine } "
102
+ + $ "contains(github.event.pull_request.labels.*.name, 'RELEASES')",
103
103
104
104
Steps = new List < GithubTask >
105
105
{
106
- new ConfigureGitTask ( )
107
- {
108
- Name = "Configure Git" ,
109
- } ,
110
-
111
106
new CheckoutTaskV3
112
107
{
113
108
Name = "Checkout code" ,
@@ -117,6 +112,11 @@ static void Main(string[] args)
117
112
}
118
113
} ,
119
114
115
+ new ConfigureGitTask ( )
116
+ {
117
+ Name = "Configure Git" ,
118
+ } ,
119
+
120
120
new ExtractProjectPropertyTask (
121
121
projectRelativePath : "ADotNet/ADotNet.csproj" ,
122
122
propertyName : "Version" ,
Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ public sealed class EnvironmentVariables
11
11
public static string IsGitHubReleaseCandidate ( ) =>
12
12
"${{\n "
13
13
+ " (\n "
14
- + " github.event_name == 'pull_request' &&\n "
15
- + " startsWith(github.event.pull_request.title, 'RELEASES:') &&\n "
14
+ + " github.event_name == 'pull_request' && \n "
15
+ + " startsWith(github.event.pull_request.title, 'RELEASES:') && \n "
16
16
+ " contains(github.event.pull_request.labels.*.name, 'RELEASES')\n "
17
17
+ " )\n "
18
18
+ " ||\n "
19
19
+ " (\n "
20
- + " github.event_name == 'push' &&\n "
21
- + " startsWith(github.event.head_commit.message, 'RELEASES:') &&\n "
20
+ + " github.event_name == 'push' && \n "
21
+ + " startsWith(github.event.head_commit.message, 'RELEASES:') && \n "
22
22
+ " startsWith(github.ref_name, 'RELEASE')\n "
23
23
+ " )\n "
24
24
+ "}}" ;
Original file line number Diff line number Diff line change @@ -34,11 +34,6 @@ public TagJob(
34
34
35
35
Steps = new List < GithubTask >
36
36
{
37
- new ConfigureGitTask ( )
38
- {
39
- Name = "Configure Git" ,
40
- } ,
41
-
42
37
new CheckoutTaskV3
43
38
{
44
39
Name = "Checkout code" ,
@@ -48,6 +43,11 @@ public TagJob(
48
43
}
49
44
} ,
50
45
46
+ new ConfigureGitTask ( )
47
+ {
48
+ Name = "Configure Git" ,
49
+ } ,
50
+
51
51
new ExtractProjectPropertyTask (
52
52
projectRelativePath ,
53
53
propertyName : "Version" ,
You can’t perform that action at this time.
0 commit comments