Skip to content

Conversation

@matt-goldman
Copy link
Owner

Summary

Fixes a couple of problems with the workflow:

  • Changes the reusable workflow to be defined in the job, not the step
  • Inherit secrets rather than passing them

🧷 This PR will be released as a preview by default.

To trigger a stable release:

  • Remove the preview label
  • Add the release label
  • Optionally add Semver-Minor or Semver-Major to control version bump

🏷️ Add labels to control release notes:

  • enhancement, bug, breaking-change, dependencies
  • Or use ignore-for-release to suppress it from notes

Copilot AI review requested due to automatic review settings August 1, 2025 22:25
@github-actions github-actions bot added the preview Triggers a release of preview version of Nuget packages label Aug 1, 2025
@matt-goldman matt-goldman added release Triggers a release of a production version of Nuget packages and removed preview Triggers a release of preview version of Nuget packages labels Aug 1, 2025
@matt-goldman matt-goldman merged commit 6c210a0 into main Aug 1, 2025
1 check passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes GitHub Actions workflow configuration issues by properly structuring a reusable workflow call and simplifying secret management. The changes ensure the CI and publish workflows follow GitHub Actions best practices for reusable workflows.

  • Restructures the publish job to use reusable workflow at the job level instead of step level
  • Removes explicit secret passing in favor of secrets: inherit pattern
  • Eliminates the nuget_key input parameter from the reusable workflow

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/reusable-publish.yml Removes nuget_key input parameter and updates step to use inherited secrets
.github/workflows/ci.yml Converts publish job to use reusable workflow properly with secrets: inherit

Comment on lines +74 to +78
with:
project_path: ${{ matrix.project.path }}
version: ${{ needs.generate-version.outputs.new_version }}
secrets: inherit
needs: generate-version
Copy link

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The needs dependency should be moved to the job level, not inside the job definition. It should be at the same indentation level as uses and with.

Suggested change
with:
project_path: ${{ matrix.project.path }}
version: ${{ needs.generate-version.outputs.new_version }}
secrets: inherit
needs: generate-version
needs: generate-version
with:
project_path: ${{ matrix.project.path }}
version: ${{ needs.generate-version.outputs.new_version }}
secrets: inherit

Copilot uses AI. Check for mistakes.
version: ${{ needs.generate-version.outputs.new_version }}
secrets: inherit
needs: generate-version
strategy:
Copy link

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The strategy block is incompatible with reusable workflows. When using uses: at the job level, you cannot define a matrix strategy in the calling workflow. The matrix should be handled within the reusable workflow itself.

Copilot uses AI. Check for mistakes.
@matt-goldman matt-goldman deleted the fix-call-to-publish branch August 1, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Triggers a release of a production version of Nuget packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants