Consider buildmode during publish to environment#2115
Open
aholstrup1 wants to merge 8 commits intomainfrom
Open
Consider buildmode during publish to environment#2115aholstrup1 wants to merge 8 commits intomainfrom
aholstrup1 wants to merge 8 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements support for build modes in the "Publish to Environment" workflow, addressing issue #2107 where the buildMode property specified in DeployTo<Environment> settings was not being respected during deployment.
Changes:
- Added
buildModeparameter to the GetArtifactsForDeployment action to filter artifacts based on the specified build mode - Modified DetermineDeploymentEnvironments to extract buildMode from environment settings and include it in the deployment matrix
- Updated tests to verify buildMode is included in the matrix output with appropriate default values
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| RELEASENOTES.md | Added entry for issue #2107 tracking the buildMode support for environment deployments |
| Actions/GetArtifactsForDeployment/action.yaml | Added buildMode input parameter with default value 'Default' |
| Actions/GetArtifactsForDeployment/README.md | Documented the new buildMode parameter in the action's README |
| Actions/GetArtifactsForDeployment/GetArtifactsForDeployment.ps1 | Implemented logic to handle buildMode when searching for artifacts, correctly prefixing artifact type masks for non-default build modes while maintaining special handling for releases and PowerPlatformSolution artifacts |
| Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1 | Enhanced to extract buildMode from environment settings and add it to the deployment matrix for each environment |
| Tests/DetermineDeploymentEnvironments.Test.ps1 | Updated test expectations to include buildMode="Default" in matrix output assertions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mazhelez
previously approved these changes
Feb 6, 2026
Actions/GetArtifactsForDeployment/GetArtifactsForDeployment.ps1
Outdated
Show resolved
Hide resolved
Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
mazhelez
approved these changes
Feb 6, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❔What, Why & How
Currently, the build mode is not considered in the "Publish to Environment" workflow. That means, even if your DeployTo setting contains a buildmode property, that property won't be respected from this workflow.
This PR addresses that by adding a buildmode parameter to the GetArtifactsForDeployment action. For now, we don't handle buildmodes when publishing artifacts from a GitHub release as that scenario would likely need a few more pieces in order to fully work (See #2088).
Related to issue: #2107
✅ Checklist