Skip to content

Commit 3e79fea

Browse files
Update publish.yml - Add ability to run dry publish & real publish via input
1 parent b278cf4 commit 3e79fea

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/publish.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Publish Crate
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
dry-run:
7+
description: 'Is this a dry-run?'
8+
required: true
9+
default: true
10+
type: boolean
511

612
jobs:
713
publish:
@@ -13,7 +19,15 @@ jobs:
1319
- uses: actions-rust-lang/[email protected]
1420
with:
1521
toolchain: stable
22+
23+
- name: Cargo Publish (Dry Run)
24+
if: ${{ inputs.dry-run === 'true' }}
25+
run: cargo publish --dry-run --token ${CRATES_TOKEN} -p antithesis_sdk
26+
env:
27+
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1628

17-
- run: cargo publish --dry-run --token ${CRATES_TOKEN} -p antithesis_sdk
29+
- name: Cargo Publish
30+
if: ${{ inputs.dry-run !== 'true' }}
31+
run: echo we will publish for real
1832
env:
19-
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
33+
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)