-
-
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.
Merge pull request #2809 from PrismLibrary/update-ci
Switch to GitHub actions
- Loading branch information
Showing
80 changed files
with
640 additions
and
1,859 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,21 @@ | ||
name: build_core | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- .github/workflows/build_core.yml | ||
- Directory.Build.props | ||
- Directory.Build.targets | ||
- xunit.runner.json | ||
- 'src/Prism.Core/**' | ||
- 'tests/Prism.Core.Tests/**' | ||
|
||
jobs: | ||
build-prism-core: | ||
uses: avantipoint/workflow-templates/.github/workflows/dotnet-build.yml@master | ||
with: | ||
name: Build Prism.Core | ||
solution-path: PrismLibrary_Core.slnf |
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,24 @@ | ||
name: build_forms | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- .github/workflows/build_forms.yml | ||
- Directory.Build.props | ||
- Directory.Build.targets | ||
- Packages.props | ||
- xunit.runner.json | ||
- 'src/Prism.Core/**' | ||
- 'tests/Prism.Core.Tests/**' | ||
- 'src/Forms/**' | ||
- 'tests/Forms/**' | ||
|
||
jobs: | ||
build-prism-forms: | ||
uses: avantipoint/workflow-templates/.github/workflows/msbuild-build.yml@master | ||
with: | ||
name: Build Prism.Forms | ||
solution-path: PrismLibrary_Forms.slnf |
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,30 @@ | ||
name: build_uno | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- .github/workflows/build_forms.yml | ||
- Directory.Build.props | ||
- Directory.Build.targets | ||
- Packages.props | ||
- xunit.runner.json | ||
- 'src/Prism.Core/**' | ||
- 'tests/Prism.Core.Tests/**' | ||
- 'src/Wpf/**' | ||
- 'tests/Wpf/**' | ||
- 'src/Uno/**' | ||
- 'tests/Uno/**' | ||
|
||
jobs: | ||
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 |
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,24 @@ | ||
name: build_wpf | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- .github/workflows/build_forms.yml | ||
- Directory.Build.props | ||
- Directory.Build.targets | ||
- Packages.props | ||
- xunit.runner.json | ||
- 'src/Prism.Core/**' | ||
- 'tests/Prism.Core.Tests/**' | ||
- 'src/Wpf/**' | ||
- 'tests/Wpf/**' | ||
|
||
jobs: | ||
build-prism-wpf: | ||
uses: avantipoint/workflow-templates/.github/workflows/dotnet-build.yml@master | ||
with: | ||
name: Build Prism.Wpf | ||
solution-path: PrismLibrary_Wpf.slnf |
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,147 @@ | ||
name: Prism CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
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 | ||
mkdir artifacts\nuget | ||
$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\nuget } | ||
Get-ChildItem $platformNuGet -Filter '*.snupkg' | Where-Object { $_.Name.StartsWith('Prism.Core') -eq $false } | ForEach-Object { Copy-Item $_.FullName .\artifacts\nuget } | ||
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\nuget } | ||
Get-ChildItem .\artifacts\Core\NuGet -Filter '*.snupkg' | ForEach-Object { Copy-Item $_.FullName .\artifacts\nuget } | ||
Get-ChildItem .\artifacts\Core\Release | ForEach-Object { Copy-Item $_.FullName .\artifacts\binaries -Recurse } | ||
Remove-Item artifacts\Core -Recurse | ||
Remove-Item artifacts\Wpf -Recurse | ||
Remove-Item artifacts\Forms -Recurse | ||
Remove-Item artifacts\Uno -Recurse | ||
Get-ChildItem .\artifacts\nuget | ForEach-Object { Write-Host $_.FullName } | ||
- name: Upload Consolidated NuGets | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: NuGet | ||
path: .\artifacts\nuget | ||
|
||
- name: Upload Consolidated Binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Binaries | ||
path: .\artifacts\binaries | ||
|
||
deploy-internal: | ||
uses: avantipoint/workflow-templates/.github/workflows/deploy-nuget.yml@master | ||
needs: generate-consolidated-artifacts | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
name: Deploy Internal | ||
secrets: | ||
feedUrl: ${{ secrets.IN_HOUSE_NUGET_FEED }} | ||
apiKey: ${{ secrets.IN_HOUSE_API_KEY }} | ||
|
||
deploy-sponsors: | ||
uses: avantipoint/workflow-templates/.github/workflows/deploy-nuget.yml@master | ||
needs: generate-consolidated-artifacts | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
name: Deploy Sponsor Connect | ||
secrets: | ||
feedUrl: ${{ secrets.SPONSOR_CONNECT_NUGET_FEED }} | ||
apiKey: ${{ secrets.SPONSOR_CONNECT_TOKEN }} |
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,11 @@ | ||
name: Publish Prism Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-release: | ||
uses: avantipoint/workflow-templates/.github/workflows/deploy-nuget-from-release.yml@master | ||
secrets: | ||
apiKey: ${{ secrets.NUGET_API_KEY }} |
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" |
Oops, something went wrong.