-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (57 loc) · 2.62 KB
/
Copy pathrelease.yml
File metadata and controls
70 lines (57 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: GitHub Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
validate-and-release:
runs-on: windows-latest
steps:
- name: Checkout tagged source
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Configure native release build
run: cmake -S . -B build-release -A x64
- name: Build native Core
run: cmake --build build-release --config Release
- name: Run release-safe native tests
run: ctest --test-dir build-release -C Release --output-on-failure -R "^(BasaltDB_tests|BasaltCore_tests|BasaltCore_scheduler_policy_tests|BasaltCore_worker_test|BasaltStorage_contract_tests)$"
- name: Build managed Core and SQL provider
run: |
dotnet build BasaltCore/BasaltCore.csproj -c Release
dotnet build BasaltCore.SqlServer/BasaltCore.SqlServer.csproj -c Release
- name: Build and run modern Embedded consumer
run: |
dotnet build consumer-smoke/Consumer.csproj -c Release
dotnet run --project consumer-smoke/Consumer.csproj -c Release --no-build
- name: Build WPF .NET Framework 4.7.2 consumer
run: dotnet build consumer-wpf/ConsumerWpf.csproj -c Release
- name: Pack NuGet packages
run: |
dotnet pack BasaltCore/BasaltCore.csproj -c Release --no-build -p:PackageVersion=1.1.0 --output artifacts/packages
dotnet pack BasaltCore.SqlServer/BasaltCore.SqlServer.csproj -c Release --no-build -p:PackageVersion=1.1.0 --output artifacts/packages
- name: Validate NuGet packages
shell: pwsh
run: |
$packages = @(
"artifacts/packages/Basalt.1.1.0.nupkg",
"artifacts/packages/Basalt.SqlServer.1.1.0.nupkg"
)
foreach ($package in $packages) {
if (-not (Test-Path $package)) { throw "Missing NuGet package: $package" }
if ((Get-Item $package).Length -le 0) { throw "Empty NuGet package: $package" }
$destination = Join-Path $env:RUNNER_TEMP ([IO.Path]::GetFileNameWithoutExtension($package))
Expand-Archive -LiteralPath $package -DestinationPath $destination -Force
if (-not (Get-ChildItem $destination -Filter *.nuspec -Recurse)) { throw "Invalid NuGet package: $package" }
}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
artifacts/packages/Basalt.1.1.0.nupkg
artifacts/packages/Basalt.SqlServer.1.1.0.nupkg