Skip to content

Commit cb52402

Browse files
Adwait DeshpandeAdwait Deshpande
authored andcommitted
Bump version to v0.1.7
1 parent eef99db commit cb52402

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,30 @@ jobs:
100100
with:
101101
files: artifacts/*.tar.gz, artifacts/*.zip
102102
env:
103-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104+
105+
publish-crates:
106+
needs: publish-release
107+
runs-on: ubuntu-latest
108+
# only run publish when triggered by a semantic version tag
109+
if: startsWith(github.ref, 'refs/tags/v')
110+
steps:
111+
- uses: actions/checkout@v4
112+
113+
- name: Install Rust
114+
uses: actions-rs/toolchain@v1
115+
with:
116+
toolchain: stable
117+
override: true
118+
119+
- name: Publish to crates.io
120+
env:
121+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
122+
run: |
123+
set -e
124+
# ensure the token is present
125+
if [ -z "$CARGO_REGISTRY_TOKEN" ]; then
126+
echo "CARGO_REGISTRY_TOKEN is not set. Add it to repository secrets to enable automated publish." >&2
127+
exit 1
128+
fi
129+
cargo publish --token "$CARGO_REGISTRY_TOKEN"

0 commit comments

Comments
 (0)