4040 - uses : actions/setup-dotnet@v1
4141 with :
4242 dotnet-version : ' 5.0.100-rc.1.20452.10'
43- - name : Move .net SDK's to shared folder (hack)
44- shell : pwsh
45- run : |
46- $version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
47- $root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
48- $directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
49- foreach ($dir in $directories) {
50- $from = $dir.FullName;
51- $to = "$root/$version";
52- Write-Host Copying from $from to $to;
53- Copy-Item "$from\*" $to -Recurse -Force;
54- }
5543
5644 - name : Building library in release mode
5745 run : dotnet build -c Release -p:ContinuousIntegrationBuild=true
7159 - uses : actions/setup-dotnet@v1
7260 with :
7361 dotnet-version : ' 5.0.100-rc.1.20452.10'
74- - name : Move .net SDK's to shared folder (hack)
75- shell : pwsh
76- run : |
77- $version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
78- $root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
79- $directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
80- foreach ($dir in $directories) {
81- $from = $dir.FullName;
82- $to = "$root/$version";
83- Write-Host Copying from $from to $to;
84- Copy-Item "$from\*" $to -Recurse -Force;
85- }
8662
8763 - name : Running unit tests
8864 run : |
@@ -124,18 +100,6 @@ jobs:
124100 - uses : actions/setup-dotnet@v1
125101 with :
126102 dotnet-version : ' 5.0.100-rc.1.20452.10'
127- - name : Move .net SDK's to shared folder (hack)
128- shell : pwsh
129- run : |
130- $version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
131- $root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
132- $directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
133- foreach ($dir in $directories) {
134- $from = $dir.FullName;
135- $to = "$root/$version";
136- Write-Host Copying from $from to $to;
137- Copy-Item "$from\*" $to -Recurse -Force;
138- }
139103
140104 - name : Creating library package
141105 run : |
@@ -160,27 +124,14 @@ jobs:
160124 - name : Checkout repository
161125 uses : actions/checkout@v2
162126 with :
163- fetch-depth : 0
164- ref : ${{ github.head_ref }}
127+ ref : ${{ github.event.pull_request.head.sha }}
165128
166129 - uses : actions/setup-dotnet@v1
167130 with :
168131 dotnet-version : ' 3.1.x'
169132 - uses : actions/setup-dotnet@v1
170133 with :
171134 dotnet-version : ' 5.0.100-rc.1.20452.10'
172- - name : Move .net SDK's to shared folder (hack)
173- shell : pwsh
174- run : |
175- $version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
176- $root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
177- $directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
178- foreach ($dir in $directories) {
179- $from = $dir.FullName;
180- $to = "$root/$version";
181- Write-Host Copying from $from to $to;
182- Copy-Item "$from\*" $to -Recurse -Force;
183- }
184135
185136 - name : Install dotnet-format
186137 run : dotnet tool install -g dotnet-format
@@ -195,7 +146,7 @@ jobs:
195146 author_name : Github Actions
196147 author_email : actions@github.com
197148 message : Automated dotnet-format update
198- ref : ${{ github.head_ref }}
149+ ref : ${{ github.event.pull_request.head.sha }}
199150 env :
200151 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
201152
@@ -218,6 +169,7 @@ jobs:
218169 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
219170
220171 code-ql :
172+ if : github.event_name != 'pull_request'
221173 runs-on : ubuntu-latest
222174 steps :
223175 - name : Checkout repository
@@ -227,29 +179,12 @@ jobs:
227179 # a pull request then we can checkout the head.
228180 fetch-depth : 0
229181
230- # If this run was triggered by a pull request event, then checkout
231- # the head of the pull request instead of the merge commit.
232- - run : git checkout HEAD^2
233- if : ${{ github.event_name == 'pull_request' }}
234-
235182 - uses : actions/setup-dotnet@v1
236183 with :
237184 dotnet-version : ' 3.1.x'
238185 - uses : actions/setup-dotnet@v1
239186 with :
240187 dotnet-version : ' 5.0.100-rc.1.20452.10'
241- - name : Move .net SDK's to shared folder (hack)
242- shell : pwsh
243- run : |
244- $version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
245- $root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
246- $directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
247- foreach ($dir in $directories) {
248- $from = $dir.FullName;
249- $to = "$root/$version";
250- Write-Host Copying from $from to $to;
251- Copy-Item "$from\*" $to -Recurse -Force;
252- }
253188
254189 - name : Initialize CodeQL
255190 uses : github/codeql-action/init@v1
@@ -296,18 +231,6 @@ jobs:
296231 - uses : actions/setup-dotnet@v1
297232 with :
298233 dotnet-version : ' 5.0.100-rc.1.20452.10'
299- - name : DOTNET HACK
300- shell : pwsh
301- run : |
302- $version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
303- $root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
304- $directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
305- foreach ($dir in $directories) {
306- $from = $dir.FullName;
307- $to = "$root/$version";
308- Write-Host Copying from $from to $to;
309- Copy-Item "$from\*" $to -Recurse -Force;
310- }
311234
312235 - name : Creating library package for pre-release
313236 if : github.event_name != 'release'
0 commit comments