File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9494
9595 create-preview-release :
9696 needs : build-windows
97- runs-on : ubuntu -latest
97+ runs-on : windows -latest
9898 # Create release if manually triggered OR if version contains "preview"
9999 if : github.event_name == 'workflow_dispatch' || github.event_name == 'push'
100100
Original file line number Diff line number Diff line change 99 workflow_dispatch :
1010
1111jobs :
12+ build :
13+ name : Build Module
14+ runs-on : windows-latest
15+ if : ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Setup .NET
21+ uses : actions/setup-dotnet@v4
22+ with :
23+ dotnet-version : |
24+ 6.0.x
25+ 8.0.x
26+
27+ - name : Install .NET Framework targeting packs
28+ shell : pwsh
29+ run : |
30+ # Install .NET Framework developer packs for building
31+ choco install netfx-4.7.2-devpack -y --no-progress
32+
33+ - name : Build Module
34+ shell : pwsh
35+ run : |
36+ Write-Host "Building dbatools.library module..."
37+ ./build/build.ps1
38+ Write-Host "Build completed"
39+
40+ - name : Upload library artifacts
41+ uses : actions/upload-artifact@v4
42+ with :
43+ name : dbatools-library
44+ path : |
45+ lib/
46+ dbatools.library.psd1
47+ dbatools.library.psm1
48+ private/
49+ LICENSE
50+
1251 test :
1352 name : Test SqlPackage on ${{ matrix.os }}
1453 runs-on : ${{ matrix.os }}
54+ needs : build
1555 if : ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
1656 strategy :
1757 fail-fast : false
@@ -29,20 +69,11 @@ jobs:
2969 github-token : ${{ secrets.GITHUB_TOKEN }}
3070 run-id : ${{ github.event.workflow_run.id }}
3171
32- - name : Setup .NET
33- uses : actions/setup-dotnet@v4
34- with :
35- dotnet-version : |
36- 6.0.x
37- 8.0.x
38-
39- - name : Build Module
72+ - name : Download library artifacts (current run)
4073 if : github.event_name != 'workflow_run'
41- shell : pwsh
42- run : |
43- Write-Host "Building dbatools.library module..."
44- ./build/build.ps1
45- Write-Host "Build completed"
74+ uses : actions/download-artifact@v4
75+ with :
76+ name : dbatools-library
4677
4778 - name : Test SqlPackage
4879 shell : pwsh
You can’t perform that action at this time.
0 commit comments