Add detect-pr-label job to manage package publishing based on PR labels#829
Add detect-pr-label job to manage package publishing based on PR labels#829aaronpowell merged 7 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a conditional publishing mechanism to the main workflow by introducing a detect-pr-label job that checks for a skip label on merged pull requests. The workflow now only publishes packages to NuGet and Azure Artifacts when the merged PR doesn't contain the skip-nuget-publish label.
- Adds a new job to detect PR labels and determine if publishing should be skipped
- Modifies existing publish jobs to depend on the label detection and conditionally run
- Adds workflow permissions for reading repository contents and pull requests
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new workflow job to detect PR labels and control package publishing based on whether a merged PR contains a skip label. The feature allows developers to prevent automatic package publishing by adding a configurable label to their pull requests.
Key changes:
- Added a new
detect-pr-labeljob that checks for a skip label on merged PRs - Modified publishing jobs to conditionally run based on the label detection
- Added proper permissions for reading pull request information
| env: | ||
| # Change this label name to whatever you use to skip publishing. | ||
| SKIP_PUBLISH_LABEL: skip-nuget-publish | ||
| steps: |
There was a problem hiding this comment.
Missing step name before the id field. GitHub Actions requires a name field or the step will use a default name. Add - name: Check for skip label before the id field.
Note: See the diff below for a potential fix:
@@ -164,6 +164,7 @@
# Change this label name to whatever you use to skip publishing.
SKIP_PUBLISH_LABEL: skip-nuget-publish
steps:
+ name: Check for skip label
id: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Minimum allowed line rate is |
No description provided.