Skip to content

Commit 29a7c83

Browse files
committed
Merge branch 'feature/ci-add-cargo-self-version'
2 parents ba804e3 + 098af63 commit 29a7c83

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@ name: Rust
33
on:
44
push:
55
branches: ["release/*"]
6-
# pull_request:
7-
# branches: [ "main" ]
86

97
env:
108
CARGO_TERM_COLOR: always
119

12-
# TODO add musl to CI see DEVELOPMENT.md
13-
1410
jobs:
1511
test:
1612
name: Running Tests
@@ -89,12 +85,13 @@ jobs:
8985
- name: Checkout Repo
9086
uses: actions/checkout@v4
9187

92-
# TODO create a cargo crate to query data from Cargo.toml
88+
- name: Installing Extra Cargo Crates
89+
run: cargo install cargo-self-version
9390

9491
- id: capture_version_from_cargo
9592
name: Capture Version from Cargo.toml
9693
run: |
97-
ver=$(cat Cargo.toml | grep -e '^version = ".*"$' | sed 's/version = "\(.*\)"/\1/')
94+
ver=$(cargo self-version)
9895
echo "pkg_ver=$ver" >> "$GITHUB_OUTPUT"
9996
10097
- name: Create Github Release
@@ -103,7 +100,7 @@ jobs:
103100
PKG_VER: ${{ steps.capture_version_from_cargo.outputs.pkg_ver }}
104101
run: |
105102
gh release create \
106-
--title v$PKG_VER --notes-file RELEASE.md $PKG_VER
103+
--title v$PKG_VER $PKG_VER
107104
github_release_upload:
108105
needs: github_release_create
109106
name: Github Release - Upload Artifacts
@@ -134,7 +131,6 @@ jobs:
134131
- name: Publish to Github Releases
135132
env:
136133
GH_TOKEN: ${{ secrets.GH_TOKEN }}
137-
# TODO resolving to blank
138134
PKG_VER: ${{ needs.github_release_create.outputs.pkg_ver }}
139135
run: |
140136
gh release upload $PKG_VER \

0 commit comments

Comments
 (0)