diff --git a/.github/workflows/Pkg EdFi.Database.Admin.yml b/.github/workflows/Pkg EdFi.Database.Admin.yml index f3ab20a737..06f7e08ef5 100644 --- a/.github/workflows/Pkg EdFi.Database.Admin.yml +++ b/.github/workflows/Pkg EdFi.Database.Admin.yml @@ -113,13 +113,11 @@ jobs: nuget pack $AdminBACPACNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes nuget pack $AdminPostgreSQLNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes - name: Install-credential-handler - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} - working-directory: ./Ed-Fi-ODS/ - run: | - .\build.githubactions.ps1 InstallCredentialHandler + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell - name: Publish Nuget package - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Database.Admin.Standard.${{ matrix.StandardVersion }}" diff --git a/.github/workflows/Pkg EdFi.Database.Security.yml b/.github/workflows/Pkg EdFi.Database.Security.yml index aa2d336013..72b43cca0f 100644 --- a/.github/workflows/Pkg EdFi.Database.Security.yml +++ b/.github/workflows/Pkg EdFi.Database.Security.yml @@ -113,14 +113,12 @@ jobs: nuget pack $SecurityBACPACNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes nuget pack $SecurityPostgreSQLNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes - name: Install-credential-handler - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} - working-directory: ./Ed-Fi-ODS/ - run: | - .\build.githubactions.ps1 InstallCredentialHandler + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell - name: Publish Nuget package + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Database.Security.Standard.${{ matrix.StandardVersion }}" .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Database.Security.BACPAC.Standard.${{ matrix.StandardVersion }}" diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index 55c2a1b407..26dc524c01 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -20,7 +20,7 @@ concurrency: env: INFORMATIONAL_VERSION: "7.3" - BUILD_INCREMENTER: "-268" + BUILD_INCREMENTER: "-839" AZURE_ARTIFACT_URL: "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json" AZURE_ARTIFACT_NUGET_KEY: ${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }} VSS_NUGET_EXTERNAL_FEED_ENDPOINTS : '{"endpointCredentials": [{"endpoint": "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json","password": "${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}"}]}' @@ -112,13 +112,11 @@ jobs: run: | .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" - name: Install-credential-handler - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} - working-directory: ./Ed-Fi-ODS/ - run: | - .\build.githubactions.ps1 InstallCredentialHandler - shell: powershell - - name: publish if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - name: publish + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" diff --git a/build.githubactions.ps1 b/build.githubactions.ps1 index 34af70fd36..1b04313e8e 100644 --- a/build.githubactions.ps1 +++ b/build.githubactions.ps1 @@ -69,6 +69,9 @@ param( [string] $RelativeRepoPath, + [string] + $Copyright = "Copyright @ " + $((Get-Date).year) + " Ed-Fi Alliance, LLC and Contributors", + [ValidateSet('4.0.0', '5.2.0')] [string] $StandardVersion @@ -153,17 +156,13 @@ function Pack { } } if ($NuspecFilePath -Like "*.nuspec" -and $null -ne $PackageName){ - $params = @{ - PackageDefinitionFile = $NuspecFilePath - Version = $version - PackageId = $PackageName - OutputDirectory = $packageOutput - BuildConfiguration = $Configuration - } + + $xml = [xml](Get-Content $NuspecFilePath) + $xml.package.metadata.id = $PackageName + $xml.package.metadata.description = $PackageName + $xml.Save($NuspecFilePath) + nuget pack $NuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties configuration=$Configuration -Properties copyright=$Copyright -NoPackageAnalysis -NoDefaultExcludes - & "$PSScriptRoot/../Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1" - - New-Package @params | Out-Host } if ([string]::IsNullOrWhiteSpace($NuspecFilePath) -and $null -ne $PackageName){ Invoke-Execute { @@ -273,12 +272,11 @@ function InstallCredentialHandler { $packageFolder = Join-Path ([IO.Path]::GetTempPath()) 'Microsoft.NuGet.CredentialProvider/' if ($fileName.EndsWith('.zip')) { Write-Host "Extracting $fileName..." - + if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } Copy-Item -Path $packageFolder\* -Destination "~/.nuget/" -Recurse -Force Write-Host "Extracted to: ~\.nuget\plugins\" -ForegroundColor Green } - } function StandardVersions {