Skip to content

Commit 345e82f

Browse files
committed
Add cargo registry token
1 parent 3b2eed4 commit 345e82f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ jobs:
8080
run: |
8181
pnpm semver ${{ inputs.crate }}
8282
83-
8483
publish_release:
8584
name: Publish
8685
runs-on: ubuntu-latest
@@ -112,6 +111,15 @@ jobs:
112111
- name: Test
113112
run: pnpm test ${{ inputs.crate }}
114113

114+
- name: Ensure CARGO_REGISTRY_TOKEN variable is set
115+
env:
116+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
117+
if: ${{ env.CARGO_REGISTRY_TOKEN == '' }}
118+
run: |
119+
echo "The CARGO_REGISTRY_TOKEN secret variable is not set"
120+
echo "Go to \"Settings\" -> \"Secrets and variables\" -> \"Actions\" -> \"New repository secret\"."
121+
exit 1
122+
115123
- name: Set Git Author
116124
run: |
117125
git config --global user.email "[email protected]"

0 commit comments

Comments
 (0)