Skip to content

fix: error on delivery of multiple release artifacts of same project#2321

Open
OleWunschmann wants to merge 8 commits into
microsoft:mainfrom
OleWunschmann:fix-deliver-to-of-release-workflow
Open

fix: error on delivery of multiple release artifacts of same project#2321
OleWunschmann wants to merge 8 commits into
microsoft:mainfrom
OleWunschmann:fix-deliver-to-of-release-workflow

Conversation

@OleWunschmann

@OleWunschmann OleWunschmann commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

❔What, Why & How

The UploadArtifacts job in CreateRelease.yaml runs as a matrix over all artifact types (Apps, TestApps, Dependencies, …). Previously, each matrix iteration called the Deliver to NuGet and Deliver to Storage steps with the hardcoded atypes lists ('Apps,TestApps' and 'Apps,TestApps,Dependencies'). This caused the Deliver action to be invoked multiple times for the same AL-Go project (once per artifact).

  • Updated the if conditions in both Templates/AppSource App/.github/workflows/CreateRelease.yaml and Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml to ensure "Deliver to NuGet" and "Deliver to Storage" steps only run when matrix.atype == 'Apps', preventing these steps from executing for test apps. [1] [2]

Related to issue: #2320

✅ Checklist

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

@OleWunschmann
OleWunschmann requested a review from a team as a code owner July 17, 2026 19:21
Copilot AI review requested due to automatic review settings July 17, 2026 19:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes duplicate NuGet/storage delivery across release artifact matrix jobs.

Changes:

  • Determines delivery eligibility per artifact type and configured secret.
  • Delivers only the current matrix artifact type.

Reviewed changes

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

File Description
Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml Updates PTE release delivery logic.
Templates/AppSource App/.github/workflows/CreateRelease.yaml Mirrors the fix for AppSource releases.

Comment thread Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml Outdated
Comment thread Templates/AppSource App/.github/workflows/CreateRelease.yaml Outdated
Comment thread Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 09:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated 4 comments.

deliveryTarget: 'NuGet'
artifacts: ${{ github.event.inputs.buildVersion }}
atypes: 'Apps,TestApps'
atypes: ${{ matrix.atype }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mazhelez @aholstrup1
I'm not sure why this was implemented this way, but I want to keep it as-is.
I reworked my solution so it now delivers only once for artifacts of type Apps, instead of delivering each artifact type separately.

deliveryTarget: 'Storage'
artifacts: ${{ github.event.inputs.buildVersion }}
atypes: 'Apps,TestApps,Dependencies'
atypes: ${{ matrix.atype }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

deliveryTarget: 'NuGet'
artifacts: ${{ github.event.inputs.buildVersion }}
atypes: 'Apps,TestApps'
atypes: ${{ matrix.atype }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

deliveryTarget: 'Storage'
artifacts: ${{ github.event.inputs.buildVersion }}
atypes: 'Apps,TestApps,Dependencies'
atypes: ${{ matrix.atype }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copilot AI review requested due to automatic review settings July 21, 2026 16:46
@OleWunschmann OleWunschmann changed the title fix: only deliver artifact with same type as artifact to upload as release artifact fix: error on delivery of multiple release artifacts of same project Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (4)

Templates/AppSource App/.github/workflows/CreateRelease.yaml:244

  • This still runs delivery only from the Apps matrix entry, while the unchanged atypes: 'Apps,TestApps' makes that entry deliver both types. It therefore does not make each eligible matrix iteration deliver its own artifact as described. Gate both eligible entries and pass matrix.atype to Deliver.
        if: ${{ matrix.atype == 'Apps' && fromJson(steps.ReadSecrets.outputs.Secrets).nuGetContext != '' }}

Templates/AppSource App/.github/workflows/CreateRelease.yaml:257

  • Restricting this step to Apps leaves the hardcoded Apps,TestApps,Dependencies delivery grouped in that one matrix job, contrary to the stated per-artifact delivery behavior. Run the step for each storage-supported type and pass only the current type.
        if: ${{ matrix.atype == 'Apps' && fromJson(steps.ReadSecrets.outputs.Secrets).storageContext != '' }}

Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml:244

  • This still runs delivery only from the Apps matrix entry, while the unchanged atypes: 'Apps,TestApps' makes that entry deliver both types. It therefore does not make each eligible matrix iteration deliver its own artifact as described. Gate both eligible entries and pass matrix.atype to Deliver.
        if: ${{ matrix.atype == 'Apps' && fromJson(steps.ReadSecrets.outputs.Secrets).nuGetContext != '' }}

Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml:257

  • Restricting this step to Apps leaves the hardcoded Apps,TestApps,Dependencies delivery grouped in that one matrix job, contrary to the stated per-artifact delivery behavior. Run the step for each storage-supported type and pass only the current type.
        if: ${{ matrix.atype == 'Apps' && fromJson(steps.ReadSecrets.outputs.Secrets).storageContext != '' }}

Copilot AI review requested due to automatic review settings July 21, 2026 16:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated no new comments.

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