Skip to content

Commit 2f1f6d6

Browse files
committed
release-plz2: add release-dry-run job
1 parent cde07b7 commit 2f1f6d6

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,21 @@ jobs:
285285
- name: Run a full build
286286
run: cargo xtask test-build --rust-gpu-version ${{ matrix.rust-gpu-version }}
287287

288+
release-dry-run:
289+
runs-on: ubuntu-latest
290+
steps:
291+
- uses: actions/checkout@v6
292+
- name: install rust-toolchain
293+
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
294+
- name: cargo fetch --locked
295+
run: cargo fetch --locked --target $TARGET
296+
- run: cargo publish --dry-run
297+
288298
# This allows us to have a single job we can branch protect on, rather than needing
289299
# to update the branch protection rules when the test matrix changes
290300
test_success:
291301
runs-on: ubuntu-latest
292-
needs: [test, compiletest, difftest, android, lint, cargo-deny, cargo-gpu-os, cargo-gpu-backwards-compat]
302+
needs: [test, compiletest, difftest, android, lint, cargo-deny, release-dry-run, cargo-gpu-os, cargo-gpu-backwards-compat]
293303
# Hack for buggy GitHub Actions behavior with skipped checks: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
294304
if: ${{ always() }}
295305
steps:
@@ -302,6 +312,7 @@ jobs:
302312
[[ "${{ needs.android.result }}" == "success" ]] || exit 1
303313
[[ "${{ needs.lint.result }}" == "success" ]] || exit 1
304314
[[ "${{ needs.cargo-deny.result }}" == "success" ]] || exit 1
315+
[[ "${{ needs.release-dry-run.result }}" == "success" ]] || exit 1
305316
[[ "${{ needs.cargo-gpu-os.result }}" == "success" ]] || exit 1
306317
[[ "${{ needs.cargo-gpu-backwards-compat.result }}" == "success" ]] || exit 1
307318

0 commit comments

Comments
 (0)