Merge pull request #20 from DecSmith42/dependabot/nuget/DecSm.Extensi… #13
This file contains hidden or 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
| name: Build | |
| permissions: { } | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [ released ] | |
| push: | |
| branches: | |
| - 'main' | |
| - 'feature/**' | |
| - 'patch/**' | |
| jobs: | |
| SetupBuildInfo: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| build-name: ${{ steps.SetupBuildInfo.outputs.build-name }} | |
| build-id: ${{ steps.SetupBuildInfo.outputs.build-id }} | |
| build-version: ${{ steps.SetupBuildInfo.outputs.build-version }} | |
| build-timestamp: ${{ steps.SetupBuildInfo.outputs.build-timestamp }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: SetupBuildInfo | |
| id: SetupBuildInfo | |
| run: dotnet run --project _atom/_atom.csproj SetupBuildInfo --skip --headless | |
| Pack: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Pack | |
| id: Pack | |
| run: dotnet run --project _atom/_atom.csproj Pack --skip --headless | |
| - name: Upload DecSm.Extensions.Json | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json | |
| path: "${{ github.workspace }}/.github/publish/DecSm.Extensions.Json" | |
| Test: | |
| strategy: | |
| matrix: | |
| job-runs-on: [ windows-latest, ubuntu-latest, macos-latest ] | |
| test-framework: [ net8.0, net9.0, net10.0 ] | |
| runs-on: ${{ matrix.job-runs-on }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Test | |
| id: Test | |
| run: dotnet run --project _atom/_atom.csproj Test --skip --headless | |
| env: | |
| job-runs-on: ${{ matrix.job-runs-on }} | |
| test-framework: ${{ matrix.test-framework }} | |
| build-slice: ${{ matrix.job-runs-on }}-${{ matrix.test-framework }} | |
| - name: Upload DecSm.Extensions.Json.Tests | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-${{ matrix.job-runs-on }}-${{ matrix.test-framework }} | |
| path: "${{ github.workspace }}/.github/publish/DecSm.Extensions.Json.Tests" | |
| PushToNuget: | |
| needs: [ Test, Pack ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Download DecSm.Extensions.Json | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json" | |
| - name: PushToNuget | |
| id: PushToNuget | |
| run: dotnet run --project _atom/_atom.csproj PushToNuget --skip --headless | |
| env: | |
| nuget-push-api-key: ${{ secrets.NUGET_PUSH_API_KEY }} | |
| PushToRelease: | |
| needs: [ Pack, Test, SetupBuildInfo ] | |
| runs-on: ubuntu-latest | |
| if: contains(needs.SetupBuildInfo.outputs.build-version, '-') == false | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Download DecSm.Extensions.Json | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-windows-latest-net8.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-windows-latest-net9.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-windows-latest-net10.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-ubuntu-latest-net8.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-ubuntu-latest-net9.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-ubuntu-latest-net10.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-macos-latest-net8.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-macos-latest-net9.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: Download DecSm.Extensions.Json.Tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: DecSm.Extensions.Json.Tests-macos-latest-net10.0 | |
| path: "${{ github.workspace }}/.github/artifacts/DecSm.Extensions.Json.Tests" | |
| - name: PushToRelease | |
| id: PushToRelease | |
| run: dotnet run --project _atom/_atom.csproj PushToRelease --skip --headless | |
| env: | |
| build-version: ${{ needs.SetupBuildInfo.outputs.build-version }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |