Skip to content

Commit 78f9030

Browse files
committed
Initial CI
1 parent 2b5de72 commit 78f9030

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: .NET
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: windows-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Setup .NET SDK
12+
uses: actions/setup-dotnet@v4
13+
with:
14+
dotnet-version: |
15+
8.0.x
16+
9.0.x
17+
- name: Install dependencies
18+
run: dotnet restore
19+
- name: Locate MSBuild with vswhere
20+
id: msbuild
21+
shell: pwsh
22+
run: |
23+
$msbuildPath = & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" `
24+
-latest -requires Microsoft.Component.MSBuild `
25+
-find MSBuild\**\Bin\MSBuild.exe
26+
27+
if (-not $msbuildPath) {
28+
Write-Error "MSBuild not found!"
29+
exit 1
30+
}
31+
32+
echo "MSBUILD=$msbuildPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
33+
Write-Host "Found MSBuild at $msbuildPath"
34+
- name: Build
35+
run: |
36+
& $env:MSBUILD AspNetCore.sln /p:Configuration=Release /p:Platform="Any CPU"
37+
- name: Test Zapto.AspNetCore.NetFx
38+
run: dotnet test --no-restore --verbosity normal tests/Zapto.AspNetCore.NetFx.Tests/Zapto.AspNetCore.NetFx.Tests.csproj
39+
- name: Publish
40+
uses: GerardSmit/publish-nuget@v4.0.2
41+
if: github.ref == 'refs/heads/main'
42+
with:
43+
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
44+
VERSION_FILE_PATH: src/Directory.Build.props
45+
PROJECT_FILE_PATH: |
46+
src/Zapto.AspNetCore.NetFx/Zapto.AspNetCore.NetFx.csproj

src/Directory.Build.props

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<Version>1.0.0-alpha.1</Version>
5+
<PackageVersion>1.0.0-alpha.1</PackageVersion>
6+
<Authors>Zapto</Authors>
7+
<RepositoryUrl>https://github.com/zapto-dev/AspNetCore</RepositoryUrl>
8+
<Copyright>Copyright © 2025 Zapto</Copyright>
9+
<PackageTags>zapto, aspnetcore</PackageTags>
10+
<PackageProjectUrl>https://github.com/zapto-dev/AspNetCore</PackageProjectUrl>
11+
<PackageLicenseUrl>https://github.com/zapto-dev/AspNetCore/blob/main/LICENSE</PackageLicenseUrl>
12+
</PropertyGroup>
13+
14+
<PropertyGroup>
15+
<ExtensionVersion>8.0.0</ExtensionVersion>
16+
</PropertyGroup>
17+
18+
<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
19+
<ExtensionVersion>9.0.0</ExtensionVersion>
20+
</PropertyGroup>
21+
22+
</Project>

0 commit comments

Comments
 (0)