Skip to content

Consider buildmode during publish to environment#2115

Open
aholstrup1 wants to merge 8 commits intomainfrom
aholstrup/deploymentenvironment
Open

Consider buildmode during publish to environment#2115
aholstrup1 wants to merge 8 commits intomainfrom
aholstrup/deploymentenvironment

Conversation

@aholstrup1
Copy link
Collaborator

@aholstrup1 aholstrup1 commented Feb 5, 2026

❔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

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios)
  • Add telemetry

@aholstrup1 aholstrup1 marked this pull request as ready for review February 6, 2026 07:10
@aholstrup1 aholstrup1 requested a review from a team as a code owner February 6, 2026 07:10
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 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 buildMode parameter 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.

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

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
mazhelez previously approved these changes Feb 6, 2026
Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants