Skip to content

Commit 7f80718

Browse files
committed
Fixing CI for the April 2022 Update
1 parent 698176e commit 7f80718

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- 'release/*'
77
paths-ignore:
88
- 'documentation/**'
9+
tags:
10+
- '*'
911
pull_request:
1012
# all branches
1113
paths-ignore:
@@ -40,17 +42,45 @@ jobs:
4042
# TODO: This is slow. Maybe we can make a docker container with this already done?
4143
run: dotnet workload install android ios maccatalyst maui
4244
- name: Test
45+
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
4346
# skip Clean, Restore, and Compile as this will build the affect the whole solution.
4447
# dotnet test will compile the necessary projects for testing only.
4548
run: nuke Test --skip Clean Restore Compile
4649
- name: Validation Checks
50+
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
4751
run: nuke ValidateSolution
48-
- name: Pack
52+
- name: Pack (CI)
53+
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
4954
# TODO build native mixins such as BuildLibSilkDroid
50-
run: nuke Pack --configuration Release --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true --feature-sets Legacy-Android Legacy-iOS
51-
- name: Push to NuGet
55+
run: nuke Pack --configuration Release --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true
56+
- name: Pack (CD)
57+
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
58+
# TODO build native mixins such as BuildLibSilkDroid
59+
run: nuke Pack --configuration Release --msbuild-properties ContinuousIntegrationBuild=true
60+
- name: Upload Unsigned Artifacts to Actions
61+
uses: actions/[email protected]
62+
with:
63+
name: unsigned_nupkgs
64+
path: "build/output_packages/*.nupkg"
65+
if-no-files-found: warn
66+
retention-days: 1
67+
- name: Push to Azure Experimental Feed
5268
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
5369
run: nuke PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://pkgs.dev.azure.com/UltzOS/Silk.NET/_packaging/Experimental/nuget/v3/index.json --nuget-username ${{ secrets.AZDO_ARTIFACTS_USERNAME }} --nuget-password ${{ secrets.AZDO_ARTIFACTS_TOKEN }} --nuget-api-key az
5470
- name: Push to GitHub Packages
5571
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
5672
run: nuke PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://nuget.pkg.github.com/dotnet/index.json --nuget-api-key ${{ secrets.GITHUB_TOKEN }}
73+
- name: Sign Packages
74+
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
75+
run: nuke SignPackages --sign-username "${{ secrets.SIGN_USERNAME }}" --sign-password "${{ secrets.SIGN_PASSWORD }}"
76+
- name: Upload Signed Artifacts to Actions
77+
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
78+
uses: actions/[email protected]
79+
with:
80+
name: signed_nupkgs
81+
path: "build/output_packages/*.nupkg"
82+
if-no-files-found: warn
83+
- name: Push to NuGet
84+
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
85+
run: nuke PushToNuGet --skip Clean Restore Pack --nuget-api-key ${{ secrets.NUGET_TOKEN }}
86+

0 commit comments

Comments
 (0)