diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml deleted file mode 100644 index 2ce8f4dd1..000000000 --- a/.github/workflows/dotnetcore.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: SharpCompress -on: - push: - branches: - - 'master' - pull_request: - types: [ opened, synchronize, reopened, ready_for_review ] - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-latest, ubuntu-latest] - - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - run: dotnet run --project build/build.csproj - - uses: actions/upload-artifact@v6 - with: - name: ${{ matrix.os }}-sharpcompress.nupkg - path: artifacts/* diff --git a/.github/workflows/nuget-release.yml b/.github/workflows/nuget-release.yml index fe7d404ae..253a93edb 100644 --- a/.github/workflows/nuget-release.yml +++ b/.github/workflows/nuget-release.yml @@ -7,6 +7,10 @@ on: - 'release' tags: - '[0-9]+.[0-9]+.[0-9]+' + pull_request: + branches: + - 'master' + - 'release' permissions: contents: read @@ -49,9 +53,9 @@ jobs: name: ${{ matrix.os }}-nuget-package path: artifacts/*.nupkg - # Push to NuGet.org using C# build target (Windows only) + # Push to NuGet.org using C# build target (Windows only, not on PRs) - name: Push to NuGet - if: success() && matrix.os == 'windows-latest' + if: success() && matrix.os == 'windows-latest' && github.event_name != 'pull_request' run: dotnet run --project build/build.csproj -- push-to-nuget env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} diff --git a/SharpCompress.sln b/SharpCompress.sln index fc9b64b8c..ba04063bf 100644 --- a/SharpCompress.sln +++ b/SharpCompress.sln @@ -20,7 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{CDB425 .editorconfig = .editorconfig Directory.Packages.props = Directory.Packages.props NuGet.config = NuGet.config - .github\workflows\dotnetcore.yml = .github\workflows\dotnetcore.yml + .github\workflows\nuget-release.yml = .github\workflows\nuget-release.yml USAGE.md = USAGE.md README.md = README.md FORMATS.md = FORMATS.md