Skip to content

Commit c9548b2

Browse files
committed
fix: debugging
1 parent e079ec3 commit c9548b2

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/cd.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: CD
22

33
on:
4-
release:
5-
# types: [published]
6-
types: [published, created, edited]
4+
push:
5+
tags:
6+
- "v*"
7+
# release:
8+
# # types: [published]
9+
# types: [published, created, edited]
710
workflow_dispatch:
811

912
jobs:
@@ -18,8 +21,9 @@ jobs:
1821

1922
- name: Update version from tag
2023
run: |
21-
echo "Tag: $GITHUB_REF_NAME"
22-
sed -i "s/^version = \".*\"/version = \"$GITHUB_REF_NAME\"/" Cargo.toml
24+
TAG="${{ github.event.release.tag_name }}"
25+
echo "Tag: $TAG"
26+
sed -i "s/^version = \".*\"/version = \"${TAG#v}\"/" Cargo.toml
2327
2428
- name: Publish to crates.io
2529
run: cargo publish --token ${{ secrets.CARGO_TOKEN }}

0 commit comments

Comments
 (0)