We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e079ec3 commit c9548b2Copy full SHA for c9548b2
.github/workflows/cd.yml
@@ -1,9 +1,12 @@
1
name: CD
2
3
on:
4
- release:
5
- # types: [published]
6
- types: [published, created, edited]
+ push:
+ tags:
+ - "v*"
7
+ # release:
8
+ # # types: [published]
9
+ # types: [published, created, edited]
10
workflow_dispatch:
11
12
jobs:
@@ -18,8 +21,9 @@ jobs:
18
21
19
22
- name: Update version from tag
20
23
run: |
- echo "Tag: $GITHUB_REF_NAME"
- 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
27
28
- name: Publish to crates.io
29
run: cargo publish --token ${{ secrets.CARGO_TOKEN }}
0 commit comments