File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed
Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 1+ name : CD
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ publish :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
12+
13+ - uses : dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable
14+
15+ - name : Update version from tag
16+ run : |
17+ VERSION=${GITHUB_REF#refs/tags/v}
18+ sed -i "s/^version = .*/version = \"$VERSION\"/" Cargo.toml
19+
20+ - name : Publish to crates.io
21+ run : cargo publish --token ${{ secrets.CARGO_TOKEN }}
Original file line number Diff line number Diff line change 3131 steps :
3232 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3333
34- - uses : dtolnay/rust-toolchain@stable
34+ - uses : dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable
3535
3636 - uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
3737 with :
Original file line number Diff line number Diff line change 11[package ]
22name = " zerv"
3- version = " 0.1 .0"
3+ version = " 0.0 .0" # Use git tag
44edition = " 2024"
5+ description = " Dynamic Versioning CLI"
6+ license = " Apache-2.0"
7+ repository = " https://github.com/wisarootl/zerv"
58
69[[bin ]]
710name = " zerv"
You can’t perform that action at this time.
0 commit comments