[PR #1099] Configure nuget-release workflow to validate PRs without publishing #1531

Open
opened 2026-01-29 22:20:59 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/1099

State: closed
Merged: Yes


The nuget-release.yml workflow only ran on direct pushes to master/release or tags, meaning PRs weren't validated by CI before merge.

Workflow Changes:

  • Added pull_request trigger for master and release branches
  • Gated NuGet publishing step with github.event_name != 'pull_request' condition

Behavior:

  • PRs: Build, test, and upload artifacts for validation - no publishing
  • Merges/Tags: Full workflow including NuGet publishing
on:
  push:
    branches: ['master', 'release']
    tags: ['[0-9]+.[0-9]+.[0-9]+']
  pull_request:
    branches: ['master', 'release']

# ...

- name: Push to NuGet
  if: success() && matrix.os == 'windows-latest' && github.event_name != 'pull_request'

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

**Original Pull Request:** https://github.com/adamhathcock/sharpcompress/pull/1099 **State:** closed **Merged:** Yes --- The `nuget-release.yml` workflow only ran on direct pushes to master/release or tags, meaning PRs weren't validated by CI before merge. **Workflow Changes:** * Added `pull_request` trigger for `master` and `release` branches * Gated NuGet publishing step with `github.event_name != 'pull_request'` condition **Behavior:** * **PRs**: Build, test, and upload artifacts for validation - no publishing * **Merges/Tags**: Full workflow including NuGet publishing ```yaml on: push: branches: ['master', 'release'] tags: ['[0-9]+.[0-9]+.[0-9]+'] pull_request: branches: ['master', 'release'] # ... - name: Push to NuGet if: success() && matrix.os == 'windows-latest' && github.event_name != 'pull_request' ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
claunia added the pull-request label 2026-01-29 22:20:59 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1531