Skip to content

Commit 1a8698a

Browse files
Merge pull request #1 from ipdata/claude/rust-ipdata-sdk-maZSe
Derive crate version from git tag instead of hardcoded Cargo.toml
2 parents 28a28e3 + 4f77ab8 commit 1a8698a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16+
- name: Set version from git tag
17+
run: |
18+
VERSION="${GITHUB_REF_NAME#v}"
19+
echo "Publishing version: $VERSION"
20+
sed -i "s/^version = .*/version = \"$VERSION\"/" Cargo.toml
21+
1622
- uses: dtolnay/rust-toolchain@stable
1723

1824
- run: cargo test

0 commit comments

Comments
 (0)