Skip to content

Commit

Permalink
Fixing CI for the April 2022 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Apr 2, 2022
1 parent 698176e commit 7f80718
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- 'release/*'
paths-ignore:
- 'documentation/**'
tags:
- '*'
pull_request:
# all branches
paths-ignore:
Expand Down Expand Up @@ -40,17 +42,45 @@ jobs:
# TODO: This is slow. Maybe we can make a docker container with this already done?
run: dotnet workload install android ios maccatalyst maui
- name: Test
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
# skip Clean, Restore, and Compile as this will build the affect the whole solution.
# dotnet test will compile the necessary projects for testing only.
run: nuke Test --skip Clean Restore Compile
- name: Validation Checks
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
run: nuke ValidateSolution
- name: Pack
- name: Pack (CI)
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
# TODO build native mixins such as BuildLibSilkDroid
run: nuke Pack --configuration Release --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true --feature-sets Legacy-Android Legacy-iOS
- name: Push to NuGet
run: nuke Pack --configuration Release --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true
- name: Pack (CD)
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
# TODO build native mixins such as BuildLibSilkDroid
run: nuke Pack --configuration Release --msbuild-properties ContinuousIntegrationBuild=true
- name: Upload Unsigned Artifacts to Actions
uses: actions/[email protected]
with:
name: unsigned_nupkgs
path: "build/output_packages/*.nupkg"
if-no-files-found: warn
retention-days: 1
- name: Push to Azure Experimental Feed
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
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
- name: Push to GitHub Packages
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
run: nuke PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://nuget.pkg.github.com/dotnet/index.json --nuget-api-key ${{ secrets.GITHUB_TOKEN }}
- name: Sign Packages
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
run: nuke SignPackages --sign-username "${{ secrets.SIGN_USERNAME }}" --sign-password "${{ secrets.SIGN_PASSWORD }}"
- name: Upload Signed Artifacts to Actions
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
uses: actions/[email protected]
with:
name: signed_nupkgs
path: "build/output_packages/*.nupkg"
if-no-files-found: warn
- name: Push to NuGet
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
run: nuke PushToNuGet --skip Clean Restore Pack --nuget-api-key ${{ secrets.NUGET_TOKEN }}

0 comments on commit 7f80718

Please sign in to comment.