Skip to content

Allow release creation for projects containing only test apps#2215

Merged
mazhelez merged 9 commits into
mainfrom
copilot/fix-release-workflow-error
Apr 21, 2026
Merged

Allow release creation for projects containing only test apps#2215
mazhelez merged 9 commits into
mainfrom
copilot/fix-release-workflow-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

❔What, Why & How

DetermineArtifactsForRelease resolved each project's build version by looking up an Apps-* or PowerPlatformSolution-* artifact. Projects that only produce a TestApps-* artifact never matched, so the release workflow aborted with No artifacts found for this project.

  • Actions/DetermineArtifactsForRelease/DetermineArtifactsForRelease.ps1:
    • When no Apps/PowerPlatformSolution artifact is found for a project but a test artifact exists, log a warning and skip the project instead of failing. Test artifacts are intentionally not added to the release. If no artifacts of any kind are found for the project, the original error is still raised.
    • The test-artifact match uses *TestApps-* so build-mode prefixes (e.g. CleanTestApps, TranslatedTestApps) are also recognized.
    • After the project loop, throw a clear error if no release artifacts were selected for any project ($include.Count -eq 0 or empty $sha), so downstream workflow steps don't fail with a confusing empty matrix / empty commitish.
  • Tests/DetermineArtifactsForRelease.Test.ps1: add Pester tests that mock the GitHub artifacts/branches APIs and cover: (1) mixed projects with apps + test artifacts produce a non-empty include list, (2) a test-only project is skipped with a ::Warning:: (including build-mode prefixes like CleanTestApps), (3) a clear error is thrown when no project has releasable artifacts, and (4) the original No artifacts found for this project error is still raised when a project has no artifacts at all.
  • RELEASENOTES.md: note the fix under Issues.
  • Merged latest main into the branch and resolved the conflict in RELEASENOTES.md (kept both Issue 2211 and Issue 2214 entries).
if ($allArtifacts | Where-Object { $_.name -like "$project-$refname-*TestApps-*.*.*.*" }) {
    Write-Host "::Warning::No release artifacts found for project $project, only test artifacts are available. Skipping project for release."
    return
}
throw "No artifacts found for this project"

✅ Checklist

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

Copilot AI changed the title [WIP] Fix release workflow error for projects with only test apps Allow release creation for projects containing only test apps Apr 17, 2026
Copilot AI requested a review from mazhelez April 17, 2026 06:52
aholstrup1
aholstrup1 previously approved these changes Apr 17, 2026
@mazhelez
Copy link
Copy Markdown
Collaborator

@copilot the proposed solution would include test artifacts in the release, which may be an unwanted side effect.
I suggest simply relaxing the check to not fail if there are only test artifacts.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 17, 2026

@copilot the proposed solution would include test artifacts in the release, which may be an unwanted side effect.
I suggest simply relaxing the check to not fail if there are only test artifacts.

Good point. Reverted the filter change and instead relaxed the check: when a project has no Apps/PowerPlatformSolution artifact but only TestApps, we now log a warning and skip the project rather than fail. Test artifacts are not added to the release. See 89e6159.

@mazhelez mazhelez requested a review from aholstrup1 April 20, 2026 08:46
@mazhelez mazhelez marked this pull request as ready for review April 20, 2026 08:46
@mazhelez mazhelez requested a review from a team as a code owner April 20, 2026 08:46
Copilot AI review requested due to automatic review settings April 20, 2026 08:46
Copy link
Copy Markdown
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

Updates the release creation workflow logic so projects that only produce test artifacts don’t block creating a release for other projects in the repo.

Changes:

  • Adjust DetermineArtifactsForRelease to warn + skip a project when only TestApps artifacts exist (instead of failing immediately).
  • Add an entry to RELEASENOTES.md for Issue 2211.

Reviewed changes

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

File Description
Actions/DetermineArtifactsForRelease/DetermineArtifactsForRelease.ps1 Skips projects with only test artifacts to allow release creation to proceed for other projects.
RELEASENOTES.md Documents the fix under Issues.

Comment thread Actions/DetermineArtifactsForRelease/DetermineArtifactsForRelease.ps1 Outdated
mazhelez and others added 2 commits April 20, 2026 23:06
…ase.ps1

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 20, 2026

@copilot the proposed solution would include test artifacts in the release, which may be an unwanted side effect.
I suggest simply relaxing the check to not fail if there are only test artifacts.

This was already addressed in 89e6159: the artifact filter is unchanged, and instead the check is relaxed — projects with only test artifacts now log a warning and are skipped, so test artifacts are not included in the release.

aholstrup1
aholstrup1 previously approved these changes Apr 21, 2026
@mazhelez
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

…orkflow-error

# Conflicts:
#	RELEASENOTES.md

Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 21, 2026

@copilot resolve the merge conflicts in this pull request

Merged origin/main into the branch and resolved the conflict in RELEASENOTES.md by keeping both Issue 2211 and Issue 2214 entries. Existing tests still pass. See 7bdaafb.

@mazhelez mazhelez enabled auto-merge (squash) April 21, 2026 13:17
@mazhelez mazhelez merged commit 730da16 into main Apr 21, 2026
8 checks passed
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.

[Bug]: Cant create a release if project does contain test app only

5 participants