Skip to content

Commit ded8bf2

Browse files
committed
fix(ci): only check if access token is set
1 parent c81d981 commit ded8bf2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ on:
88

99
name: Publish
1010

11-
permissions:
12-
contents: read
13-
1411
jobs:
1512
publish:
1613
name: Publish
@@ -28,6 +25,8 @@ jobs:
2825
check-publish:
2926
name: Check Publish
3027
runs-on: ubuntu-latest
28+
env:
29+
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
3130
if: startsWith(github.ref, 'refs/tags/v') != true
3231
steps:
3332
- name: Checkout sources
@@ -37,4 +36,5 @@ jobs:
3736
uses: dtolnay/rust-toolchain@stable
3837

3938
- name: Check if can publish on crates.io
40-
run: cargo publish --token ${{ secrets.CRATES_TOKEN }} --dry-run -v
39+
if: ${{ env.CARGO_REGISTRY_TOKEN }}
40+
run: cargo publish --token ${{ env.CARGO_REGISTRY_TOKEN }} --dry-run -v

0 commit comments

Comments
 (0)