Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
runs-on: ubuntu-latest
environment:
name: release
deployment: false
permissions:
contents: read
id-token: write
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
runs-on: ubuntu-latest
environment:
name: release
deployment: false
env:
VERSION: ${{ fromJson(inputs.plan).announcement_tag }}
steps:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
runs-on: ubuntu-latest
environment:
name: release
deployment: false
permissions:
id-token: write # For PyPI's trusted publishing
steps:
Expand All @@ -36,7 +35,6 @@ jobs:
runs-on: ubuntu-latest
environment:
name: release
deployment: false
permissions:
id-token: write # For PyPI's trusted publishing
steps:
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ env:
CARGO_DIST_CHECKSUM: "cd355dab0b4c02fb59038fef87655550021d07f45f1d82f947a34ef98560abb8"

jobs:
release-gate:
name: release-gate
if: ${{ inputs.tag != 'dry-run' }}
runs-on: ubuntu-latest
environment:
name: release-gate
deployment: false
Comment on lines +59 to +61
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.

Can we add a comment or something to this? This is Absolute Sorcery and without the context of this PR looks like a noop task.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Wise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

steps:
- run: echo "Release approved"

# Run 'dist plan' (or host) to determine what tasks we need to do
plan:
runs-on: "depot-ubuntu-latest-4"
Expand Down Expand Up @@ -108,7 +118,8 @@ jobs:
custom-build-docker:
needs:
- plan
if: ${{ needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload' || inputs.tag == 'dry-run' }}
- release-gate
if: ${{ always() && needs.plan.result == 'success' && (needs.release-gate.result == 'success' || needs.release-gate.result == 'skipped') && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload' || inputs.tag == 'dry-run') }}
Comment on lines -111 to +122
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This fixes dry-run Docker builds, which probably weren't working before. Oops!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not critical for this PR, but we could probably simplify these conditions a bit with the new case() function:

https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#case

uses: ./.github/workflows/build-docker.yml
with:
plan: ${{ needs.plan.outputs.val }}
Expand Down Expand Up @@ -256,6 +267,7 @@ jobs:
needs:
- plan
- host
- release-gate
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
uses: ./.github/workflows/publish-pypi.yml
with:
Expand All @@ -270,6 +282,7 @@ jobs:
needs:
- plan
- host
- release-gate
- custom-publish-pypi # DIRTY: see #16989
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
uses: ./.github/workflows/publish-crates.yml
Expand All @@ -286,12 +299,13 @@ jobs:
needs:
- plan
- host
- release-gate
- custom-publish-pypi
- custom-publish-crates
# use "always() && ..." to allow us to wait for all publish jobs while
# still allowing individual publish jobs to skip themselves (for prereleases).
# "host" however must run to completion, no skipping allowed!
if: ${{ always() && needs.host.result == 'success' && (needs.custom-publish-pypi.result == 'skipped' || needs.custom-publish-pypi.result == 'success') && (needs.custom-publish-crates.result == 'skipped' || needs.custom-publish-crates.result == 'success') }}
if: ${{ always() && needs.host.result == 'success' && needs.release-gate.result == 'success' && (needs.custom-publish-pypi.result == 'skipped' || needs.custom-publish-pypi.result == 'success') && (needs.custom-publish-crates.result == 'skipped' || needs.custom-publish-crates.result == 'success') }}
runs-on: "depot-ubuntu-latest-4"
environment:
name: release
Expand Down
Loading