-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
131 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
name: Start NuGet Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-prism-core: | ||
uses: avantipoint/workflow-templates/.github/workflows/dotnet-build.yml@master | ||
with: | ||
name: Build Prism.Core | ||
solution-path: PrismLibrary_Core.slnf | ||
code-sign: true | ||
artifact-name: Core | ||
secrets: | ||
codeSignKeyVault: ${{ secrets.CodeSignKeyVault }} | ||
codeSignClientId: ${{ secrets.CodeSignClientId }} | ||
codeSignTenantId: ${{ secrets.CodeSignTenantId }} | ||
codeSignClientSecret: ${{ secrets.CodeSignClientSecret }} | ||
codeSignCertificate: ${{ secrets.CodeSignCertificate }} | ||
|
||
build-prism-wpf: | ||
uses: avantipoint/workflow-templates/.github/workflows/dotnet-build.yml@master | ||
with: | ||
name: Build Prism.Wpf | ||
solution-path: PrismLibrary_Wpf.slnf | ||
code-sign: true | ||
artifact-name: Wpf | ||
secrets: | ||
codeSignKeyVault: ${{ secrets.CodeSignKeyVault }} | ||
codeSignClientId: ${{ secrets.CodeSignClientId }} | ||
codeSignTenantId: ${{ secrets.CodeSignTenantId }} | ||
codeSignClientSecret: ${{ secrets.CodeSignClientSecret }} | ||
codeSignCertificate: ${{ secrets.CodeSignCertificate }} | ||
|
||
build-prism-forms: | ||
uses: avantipoint/workflow-templates/.github/workflows/msbuild-build.yml@master | ||
with: | ||
name: Build Prism.Forms | ||
solution-path: PrismLibrary_Forms.slnf | ||
code-sign: true | ||
artifact-name: Forms | ||
secrets: | ||
codeSignKeyVault: ${{ secrets.CodeSignKeyVault }} | ||
codeSignClientId: ${{ secrets.CodeSignClientId }} | ||
codeSignTenantId: ${{ secrets.CodeSignTenantId }} | ||
codeSignClientSecret: ${{ secrets.CodeSignClientSecret }} | ||
codeSignCertificate: ${{ secrets.CodeSignCertificate }} | ||
|
||
build-prism-uno: | ||
uses: avantipoint/workflow-templates/.github/workflows/msbuild-build.yml@master | ||
with: | ||
name: Build Prism.Uno | ||
solution-path: PrismLibrary_Uno.slnf | ||
dotnet-version: 7.0.102 | ||
uno-check: true | ||
uno-check-parameters: '--skip xcode --skip gtk3 --skip vswin --skip vsmac' | ||
run-tests: false | ||
code-sign: true | ||
artifact-name: Uno | ||
secrets: | ||
codeSignKeyVault: ${{ secrets.CodeSignKeyVault }} | ||
codeSignClientId: ${{ secrets.CodeSignClientId }} | ||
codeSignTenantId: ${{ secrets.CodeSignTenantId }} | ||
codeSignClientSecret: ${{ secrets.CodeSignClientSecret }} | ||
codeSignCertificate: ${{ secrets.CodeSignCertificate }} | ||
|
||
generate-consolidated-artifacts: | ||
needs: [build-prism-core, build-prism-wpf, build-prism-forms, build-prism-uno] | ||
runs-on: windows-latest | ||
steps: | ||
- name: Download Core | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Core | ||
path: artifacts\Core | ||
|
||
- name: Download Wpf | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Wpf | ||
path: artifacts\Wpf | ||
|
||
- name: Download Forms | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Forms | ||
path: artifacts\Forms | ||
|
||
- name: Download Uno | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Uno | ||
path: artifacts\Uno | ||
|
||
- name: Consolidate Artifacts | ||
run: | | ||
mkdir artifacts\binaries | ||
$platforms = @('Forms', 'Wpf', 'Uno') | ||
$platformNuGet = $platforms | ForEach-Object { Join-Path -Path .\artifacts -ChildPath "$_\NuGet" } | ||
$platformBinary = $platforms | ForEach-Object { Join-Path -Path .\artifacts -ChildPath "$_\Release" } | ||
Get-ChildItem $platformNuGet -Filter '*.nupkg' | Where-Object { $_.Name.StartsWith('Prism.Core') -eq $false } | ForEach-Object { Copy-Item $_.FullName .\artifacts } | ||
Get-ChildItem $platformNuGet -Filter '*.snupkg' | Where-Object { $_.Name.StartsWith('Prism.Core') -eq $false } | ForEach-Object { Copy-Item $_.FullName .\artifacts } | ||
Get-ChildItem $platformBinary | Where-Object { $_.Name -ne 'Core' } | ForEach-Object { Copy-Item $_.FullName .\artifacts\binaries -Recurse } | ||
Get-ChildItem .\artifacts\Core\NuGet -Filter '*.nupkg' | ForEach-Object { Copy-Item $_.FullName .\artifacts } | ||
Get-ChildItem .\artifacts\Core\NuGet -Filter '*.snupkg' | ForEach-Object { Copy-Item $_.FullName .\artifacts } | ||
Get-ChildItem .\artifacts\Core\Release | ForEach-Object { Copy-Item $_.FullName .\artifacts\binaries -Recurse } | ||
Compress-Archive -Path (Get-ChildItem .\artifacts\binaries) -DestinationPath .\artifacts\binaries.zip | ||
Remove-Item artifacts\Core -Recurse | ||
Remove-Item artifacts\Wpf -Recurse | ||
Remove-Item artifacts\Forms -Recurse | ||
Remove-Item artifacts\Uno -Recurse | ||
Remove-Item artifacts\binaries -Recurse | ||
Get-ChildItem .\artifacts | ForEach-Object { Write-Host $_.FullName } | ||
- name: Upload Consolidated NuGets | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: NuGet | ||
path: .\artifacts | ||
|
||
release: | ||
uses: avantipoint/workflow-templates/.github/workflows/generate-release.yml@master | ||
needs: [generate-consolidated-artifacts] | ||
permissions: | ||
contents: write | ||
with: | ||
package-name: Prism.Core | ||
artifacts: "Artifacts/*.nupkg,Artifacts/*.snupkg,Artifacts/*.zip" |