Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8 Update #29

Merged
merged 11 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
build_and_deploy_job:
env:
DIST_PATH: src/samples/EFCoreSample/EFCoreSample.Wasm/bin/Release/net7.0/dist
DIST_PATH: src/samples/EFCoreSample/EFCoreSample.Wasm/bin/Release/net8.0/dist

if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
Expand All @@ -37,15 +37,10 @@ jobs:
with:
useConfigFile: true
configFilePath: gitversion.yml

- name: Setup dotnet 5.0.x
uses: actions/[email protected]
with:
dotnet-version: '5.0.x'


- uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.100-rc.2.22477.23'
dotnet-version: '8.0.100'
include-prerelease: true

- run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
Expand Down
43 changes: 31 additions & 12 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ jobs:
- job: Windows

pool:
vmImage: 'windows-2019'
vmImage: 'windows-latest'

variables:
NUGET_PACKAGES: $(Agent.WorkFolder)\.nuget
NUGET_HTTP_CACHE_PATH: $(Agent.WorkFolder)\.nuget-http-cache
- name: NUGET_PACKAGES
value: $(Agent.WorkFolder)\.nuget
- name: NUGET_HTTP_CACHE_PATH
value: $(Agent.WorkFolder)\.nuget-http-cache
- group: 'Uno Platform authenticode signing'

steps:
- checkout: self
Expand All @@ -21,14 +24,30 @@ jobs:
version: 5.x

- task: UseDotNet@2
displayName: 'Use .NET 7 SDK'
displayName: 'Use .NET SDK'
inputs:
version: 7.0.100-rc.2.22477.23
version: 8.0.100
includePreviewVersions: true

- powershell: |
dotnet build /r /p:Configuration=Release src/SQLitePCLRaw.Wasm-ci.slnf "/p:PackageOutputPath=$(build.artifactstagingdirectory)\nuget" "/p:PackageVersion=$env:GITVERSION_FullSemVer" "/p:InformationalVersion=$env:GITVERSION_InformationalVersion" /detailedsummary


- task: DotNetCoreInstaller@0
inputs:
version: '2.1.504'

- task: PowerShell@2
displayName: Authenticode Sign Packages
inputs:
filePath: build/Sign-Package.ps1
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
SignPackageName: "Uno.SQLitePCLRaw.Wasm"
SignPackageDescription: "Uno.SQLitePCLRaw.Wasm"
ArtifactDirectory: $(build.artifactstagingdirectory)
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))

- task: PublishBuildArtifacts@1
condition: always()
inputs:
Expand All @@ -37,11 +56,11 @@ jobs:
publishLocation: Container

- job: Linux
container: unoplatform/wasm-build:3.0

pool:
vmImage: 'ubuntu-latest'

container: unoplatform/wasm-build:3.0

variables:
DotnetRuntimePath: /usr/share/dotnet

Expand All @@ -57,19 +76,19 @@ jobs:
version: 5.x

- task: UseDotNet@2
displayName: 'Use .NET 7 SDK'
displayName: 'Use .NET SDK'
inputs:
version: 7.0.100-rc.2.22477.23
version: 8.0.100
includePreviewVersions: true

- bash: |
dotnet msbuild /r /p:Configuration=Release "/p:PackageOutputPath=$(build.artifactstagingdirectory)\nuget" "/p:PackageVersion=$GITVERSION_FULLSEMVER" "/p:InformationalVersion=$GITVERSION_INFORMATIONALVERSION" ./src/samples/EFCoreSample/EFCoreSample.Wasm/EFCoreSample.Wasm.csproj
dotnet build -c Release "/p:PackageOutputPath=$(build.artifactstagingdirectory)\nuget" "/p:PackageVersion=$GITVERSION_FULLSEMVER" "/p:InformationalVersion=$GITVERSION_INFORMATIONALVERSION" ./src/samples/EFCoreSample/EFCoreSample.Wasm/EFCoreSample.Wasm.csproj

displayName: 'Build Wasm Head'

- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
inputs:
pathToPublish: ./src/samples/EFCoreSample/EFCoreSample.Wasm/bin/Release/net7.0/dist
pathToPublish: ./src/samples/EFCoreSample/EFCoreSample.Wasm/bin/Release/net8.0/dist
artifactType: container
artifactName: EFCoreSample-Wasm
13 changes: 13 additions & 0 deletions build/SignClient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"SignClient": {
"AzureAd": {
"AADInstance": "https://login.microsoftonline.com/",
"ClientId": "80441c68-7fd8-4866-8dd1-8c78ff585a8a",
"TenantId": "a297d6c0-b635-41a3-b1e3-558efe71e413"
},
"Service": {
"Url": "https://uno-signservice.azurewebsites.net",
"ResourceId": "https://SignService.platformuno.onmicrosoft.com/6dd8824b-6147-4b02-a1af-ea83b0ffebdb"
}
}
}
22 changes: 22 additions & 0 deletions build/sign-package.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$currentDirectory = split-path $MyInvocation.MyCommand.Definition

# See if we have the ClientSecret available
if ([string]::IsNullOrEmpty($env:SignClientSecret)) {
Write-Host "Client Secret not found, not signing packages"
return;
}

dotnet tool install --tool-path . SignClient

# Setup Variables we need to pass into the sign client tool
$appSettings = "$currentDirectory\SignClient.json"

$filesToSign = Get-ChildItem -Recurse $Env:ArtifactDirectory\* -Include *.nupkg,*.vsix | Select-Object -ExpandProperty FullName

foreach ($fileToSign in $filesToSign) {
Write-Host "Submitting $fileToSign for signing"
.\SignClient 'sign' -c $appSettings -i $fileToSign -r $env:SignClientUser -s $env:SignClientSecret -n "$env:SignPackageName" -d "$env:SignPackageDescription" -u "$env:build_repository_uri"
Write-Host "Finished signing $fileToSign"
}

Write-Host "Sign-package complete"
Loading
Loading