Test new version schema. #204
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- '**' | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- '**.md' | |
release: | |
types: | |
- published | |
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
mysqlCurrentSqlMode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION | |
mysqlLegacySqlMode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | |
# Currently no ONLY_FULL_GROUP_BY, see #1167: | |
mariadbSqlMode: STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION | |
maxConnections: 512 | |
skipAllTests: false | |
skipWindowsTests: false | |
jobs: | |
NuGet: | |
if: (github.event_name == 'push' || github.event_name == 'release') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: .NET Information | |
shell: pwsh | |
run: | | |
dotnet --info | |
- name: NuGet Pack | |
shell: pwsh | |
run: | | |
$officialBuild = $true | |
$officialVersion = '9.0.0-preview.2.efcore.9.0.0' | |
$wipBuild = $false | |
$ciBuildOnly = $true | |
$continuousIntegrationTimestamp = Get-Date -Format yyyyMMddHHmmss | |
$buildSha = '${{ github.sha }}'.SubString(0, 7); | |
$pack = $officialBuild -or $ciBuildOnly | |
$pushToAzureArtifacts = $pack | |
$pushToMygetOrg = $pack | |
$pushToNugetOrg = $pack -and $officialBuild | |
echo "pushToAzureArtifacts: $pushToAzureArtifacts" | |
echo "pushToMygetOrg: $pushToMygetOrg" | |
echo "pushToNugetOrg: $pushToNugetOrg" | |
echo "officialBuild: $officialBuild" | |
echo "officialVersion: $officialVersion" | |
echo "wipBuild: $wipBuild" | |
echo "ciBuildOnly: $ciBuildOnly" | |
echo "continuousIntegrationTimestamp: $continuousIntegrationTimestamp" | |
echo "buildSha: $buildSha" | |
echo "pack: $pack" | |
if ($pack) | |
{ | |
$projectFiles = Get-ChildItem src/*/*.csproj -Recurse | % { $_.FullName } | |
$combinations = @('default', @('Release')), @('withPdbs', @('Release', 'Debug')) #, @('embeddedPdbs', @('Release', 'Debug')) | |
foreach ($combination in $combinations) | |
{ | |
$type = $combination[0] | |
$configurations = $combination[1] | |
foreach ($configuration in $configurations) | |
{ | |
$arguments = 'pack', '-c', $configuration, '-o', "nupkgs/$configuration/$type", '-p:ContinuousIntegrationBuild=true', '-p:OutputVersionProperties=true' | |
if ($officialBuild) | |
{ | |
$finalOfficialVersion = $configuration -eq 'Debug' ` | |
? $officialVersion.Contains('-') ` | |
? $officialVersion + '.debug' ` | |
: $officialVersion + '-debug' ` | |
: $officialVersion | |
$arguments += "-p:OfficialVersion=$finalOfficialVersion" | |
} | |
if ($ciBuildOnly) | |
{ | |
$arguments += "-p:ContinuousIntegrationTimestamp=$continuousIntegrationTimestamp" | |
$arguments += "-p:BuildSha=$buildSha" | |
} | |
switch ($type) | |
{ | |
'withPdbs' { $arguments += '-p:PackPdb=true', '-p:IncludeSymbols=false' } | |
'embeddedPdbs' { $arguments += '-p:DebugType=embedded', '-p:IncludeSymbols=false' } | |
} | |
foreach ($projectFile in $projectFiles) | |
{ | |
echo "Type: $type, Configuration: $configuration, Project: $projectFile" | |
echo "Pack command: dotnet $(($arguments + $projectFile) -join ' ')" | |
& dotnet ($arguments + $projectFile) | |
} | |
} | |
} | |
} | |
echo "pushToAzureArtifacts=$pushToAzureArtifacts" >> $env:GITHUB_ENV | |
echo "pushToMygetOrg=$pushToMygetOrg" >> $env:GITHUB_ENV | |
echo "pushToNugetOrg=$pushToNugetOrg" >> $env:GITHUB_ENV | |
Get-ChildItem nupkgs/ -Recurse -Force | Select-Object -ExpandProperty FullName |