Skip to content

Commit b190aba

Browse files
feat(pipelines): add executePublish parameter to publish pipelines (#504)
Adds an `executePublish` parameter to the publishing root pipelines and threads it into the shared `OxidizerGitHub.Publish.yml` template (ox-sdk). **Why:** the cargo release dry-run in `publish_staging` fails when multiple crates must be published in one run, because a dependent crate's dry-run cannot resolve the not-yet-published version of an earlier crate in topo order. **Behavior:** - `publish.yml` (Official): `executePublish` defaults to **true** -> real publish (`execute: true`). - `publish-testing.yml` (unofficial): defaults to **false** -> `publish_staging` is skipped, so per-commit runs no longer hit the broken dry-run. Set it true to exercise the publish path as a dry-run. Requires the matching ox-sdk template change that adds the `executePublish` parameter.
1 parent aa9d58a commit b190aba

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

.ado/pipelines/publish-testing.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ parameters:
1515
- name: previousVersion
1616
type: string
1717
default: 'HEAD^'
18+
# Whether to perform the publish. Defaults to false on the unofficial
19+
# (Testing) pipeline so per-commit runs skip publishing entirely. Set it to
20+
# true to exercise the publish path as a dry-run (the template forces
21+
# `execute: false` for Testing); note that the cargo release dry-run can fail
22+
# when multiple crates must be published in one run.
23+
- name: executePublish
24+
displayName: 'Publish crates (dry-run on this unofficial pipeline)'
25+
type: boolean
26+
default: false
1827

1928
resources:
2029
repositories:
@@ -32,4 +41,5 @@ extends:
3241
validationOsList: ${{ parameters.validationOsList }}
3342
validationProfiles: ${{ parameters.validationProfiles }}
3443
previousVersion: ${{ parameters.previousVersion }}
35-
pipelineType: 'Testing'
44+
pipelineType: 'Testing'
45+
executePublish: ${{ parameters.executePublish }}

.ado/pipelines/publish.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ parameters:
1515
- name: previousVersion
1616
type: string
1717
default: 'HEAD^'
18+
# Whether to perform the publish. On the Official pipeline this defaults to
19+
# true so qualifying builds publish for real.
20+
- name: executePublish
21+
displayName: 'Publish crates (real publish)'
22+
type: boolean
23+
default: true
1824

1925
resources:
2026
repositories:
@@ -29,4 +35,5 @@ extends:
2935
parameters:
3036
validationOsList: ${{ parameters.validationOsList }}
3137
validationProfiles: ${{ parameters.validationProfiles }}
32-
previousVersion: ${{ parameters.previousVersion }}
38+
previousVersion: ${{ parameters.previousVersion }}
39+
executePublish: ${{ parameters.executePublish }}

0 commit comments

Comments
 (0)