Upload assets #11
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
| # Publishes beta-versions only | |
| name: Publish Package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| - name: .NET SDKs | |
| run: dotnet --list-sdks | |
| - name: .NET Info | |
| run: dotnet --info | |
| - name: Restore dependencies | |
| run: dotnet restore ./Ocelot.Testing.sln | |
| - name: Build project | |
| run: dotnet build ./src/Ocelot.Testing.csproj --configuration Release --no-restore | |
| - name: Pack project | |
| run: dotnet pack ./src/Ocelot.Testing.csproj --configuration Release --output ./packages | |
| # - name: Publish to GitHub Packages | |
| # run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/ThreeMammals/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate | |
| # - name: Publish to NuGet | |
| # run: dotnet nuget push ./packages/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY_2025 }} --skip-duplicate |