|
| 1 | +# Publishes beta-versions only |
| 2 | +name: Publish Package |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + dotnet-version: [ '8.0', '9.0' ] |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v4 |
| 16 | + - name: Setup .NET ${{ matrix.dotnet-version }} |
| 17 | + uses: actions/setup-dotnet@v3 |
| 18 | + with: |
| 19 | + dotnet-version: ${{ matrix.dotnet-version }}.x |
| 20 | + - name: .NET Info |
| 21 | + run: dotnet --info |
| 22 | + - name: Restore |
| 23 | + run: dotnet restore ./Ocelot.Administration.IdentityServer4.sln -p:TargetFramework=net${{ matrix.dotnet-version }} |
| 24 | + - name: Build |
| 25 | + run: dotnet build --no-restore ./Ocelot.Administration.IdentityServer4.sln --framework net${{ matrix.dotnet-version }} |
| 26 | + - name: Unit Tests |
| 27 | + run: dotnet test --no-restore --no-build --collect:"XPlat Code Coverage" --framework net${{ matrix.dotnet-version }} ./unit/Ocelot.Administration.IdentityServer4.UnitTests.csproj |
| 28 | + - name: Acceptance Tests |
| 29 | + run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./acceptance/Ocelot.Administration.IdentityServer4.AcceptanceTests.csproj |
| 30 | + - name: Report generator |
| 31 | + run: dotnet tool run reportgenerator |
| 32 | + |
| 33 | + # build2: |
| 34 | + # runs-on: ubuntu-latest |
| 35 | + # permissions: |
| 36 | + # packages: write |
| 37 | + # contents: read |
| 38 | + # steps: |
| 39 | + # - name: Checkout repository |
| 40 | + # uses: actions/checkout@v4 |
| 41 | + |
| 42 | + # - name: Setup .NET |
| 43 | + # uses: actions/setup-dotnet@v4 |
| 44 | + # with: |
| 45 | + # dotnet-version: | |
| 46 | + # 8.0.x |
| 47 | + # 9.0.x |
| 48 | + |
| 49 | + # - name: .NET Info |
| 50 | + # run: dotnet --info |
| 51 | + |
| 52 | + # - name: Restore dependencies |
| 53 | + # run: dotnet restore ./Ocelot.Administration.IdentityServer4.sln |
| 54 | + |
| 55 | + # - name: Build project |
| 56 | + # run: dotnet build ./src/Ocelot.Testing.csproj --configuration Release --no-restore |
| 57 | + |
| 58 | + # - name: Pack project |
| 59 | + # run: dotnet pack ./src/Ocelot.Testing.csproj --configuration Release --output ./packages |
| 60 | + |
| 61 | + # - name: Publish to GitHub Packages |
| 62 | + # run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/ThreeMammals/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate |
| 63 | + |
| 64 | + # - name: Publish to NuGet |
| 65 | + # run: dotnet nuget push ./packages/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY_2025 }} --skip-duplicate |
0 commit comments