Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ jobs:

compatibility:
name: Release compatibility (${{ matrix.target }})
if: needs.resolve.outputs.mode == 'publish' || needs.resolve.outputs.mode == 'repair'
if: needs.resolve.outputs.mode == 'publish'
needs:
- resolve
- candidate
Expand Down Expand Up @@ -406,7 +406,13 @@ jobs:

package:
name: Prove release candidate
if: needs.resolve.outputs.mode == 'publish' || needs.resolve.outputs.mode == 'repair'
if: >-
always() &&
needs.resolve.result == 'success' &&
needs.candidate.result == 'success' &&
(needs.resolve.outputs.mode == 'publish' || needs.resolve.outputs.mode == 'repair') &&
(needs.compatibility.result == 'success' ||
(needs.resolve.outputs.mode == 'repair' && needs.compatibility.result == 'skipped'))
needs:
- resolve
- candidate
Expand Down
12 changes: 12 additions & 0 deletions scripts/release-validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,20 @@ test("release workflow is pinned and publishes proven assets after validation",
workflow.indexOf("\n candidate:\n"),
workflow.indexOf("\n compatibility:\n"),
)
const compatibilityJob = workflow.slice(
workflow.indexOf("\n compatibility:\n"),
workflow.indexOf("\n package:\n"),
)
const packageJob = workflow.slice(
workflow.indexOf("\n package:\n"),
workflow.indexOf("\n release:\n"),
)
expect(candidateJob).toContain(" permissions:\n actions: read\n contents: read\n")
expect(candidateJob).toContain("persist-credentials: false")
expect(compatibilityJob).toContain("if: needs.resolve.outputs.mode == 'publish'")
expect(packageJob).toContain("always()")
expect(packageJob).toContain("needs.compatibility.result == 'skipped'")
expect(packageJob).toContain("needs.resolve.outputs.mode == 'repair'")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
expect(workflow.match(/--dir "\$RUNNER_TEMP\/platform-candidate"/g)).toHaveLength(2)
expect(maintainJob).toContain("persist-credentials: false")
expect(maintainJob).toContain("group: release-maintenance")
Expand Down