Skip to content

Commit 14652b3

Browse files
committed
chore(ci): use env var for cargo token check in release workflow
1 parent 7a76b9e commit 14652b3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
release:
1313
name: Release
1414
runs-on: ubuntu-latest
15+
env:
16+
HAS_CARGO_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN != '' }}
1517
steps:
1618
- name: Checkout
1719
uses: actions/checkout@v6
@@ -74,7 +76,7 @@ jobs:
7476
fi
7577
7678
- name: Publish to crates.io
77-
if: ${{ secrets.CARGO_REGISTRY_TOKEN != '' && steps.publish-ready.outputs.ready == 'true' }}
79+
if: ${{ env.HAS_CARGO_TOKEN == 'true' && steps.publish-ready.outputs.ready == 'true' }}
7880
run: cargo publish --workspace --locked
7981
env:
8082
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)