only let publish run on tags

This commit is contained in:
alice pellerin
2026-05-01 16:16:14 -05:00
parent 22542b6d29
commit d7bdccfddb
+2 -1
View File
@@ -12,7 +12,8 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: check version - name: check version
# cut off the v part of the tag to only search for the number # cut off the v part of the tag to only search for the number
run: grep -q "$(echo "${{ github.ref_name }}" | cut -c2-)" Cargo.toml # include the " = " to not match on main, only v* tags
run: grep -q " = \"$(echo "${{ github.ref_name }}" | cut -c2-)\"" Cargo.toml
- uses: rust-lang/crates-io-auth-action@v1 - uses: rust-lang/crates-io-auth-action@v1
id: auth id: auth
- run: cargo publish - run: cargo publish