|
6 | 6 | - 'release/*' |
7 | 7 | paths-ignore: |
8 | 8 | - 'documentation/**' |
| 9 | + tags: |
| 10 | + - '*' |
9 | 11 | pull_request: |
10 | 12 | # all branches |
11 | 13 | paths-ignore: |
@@ -40,17 +42,45 @@ jobs: |
40 | 42 | # TODO: This is slow. Maybe we can make a docker container with this already done? |
41 | 43 | run: dotnet workload install android ios maccatalyst maui |
42 | 44 | - name: Test |
| 45 | + if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }} |
43 | 46 | # skip Clean, Restore, and Compile as this will build the affect the whole solution. |
44 | 47 | # dotnet test will compile the necessary projects for testing only. |
45 | 48 | run: nuke Test --skip Clean Restore Compile |
46 | 49 | - name: Validation Checks |
| 50 | + if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }} |
47 | 51 | run: nuke ValidateSolution |
48 | | - - name: Pack |
| 52 | + - name: Pack (CI) |
| 53 | + if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }} |
49 | 54 | # 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 | + |
| 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 |
52 | 68 | if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }} |
53 | 69 | 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 |
54 | 70 | - name: Push to GitHub Packages |
55 | 71 | if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }} |
56 | 72 | 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 | + |
| 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