Skip to content

Commit

Permalink
Updated the build CI to create a tag when the version is incremented
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasJowett committed Jun 15, 2023
1 parent 6157b56 commit 702dd7d
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 139 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,18 @@ jobs:
run: cargo test --verbose

- name: Clippy
run: cargo clippy --verbose -- -D warnings
run: cargo clippy --verbose -- -D warnings

- name: Determine version change
id: version_change
run: |
previous_version=$(git describe --abbrev=0 --tags || echo "")
current_version=$(awk -F\" '/version/ {print $2}' Cargo.toml")
echo "::set-output name=version_changed::$(test -z "$previous_version" || test "$previous_version" != "$current_version"; echo $?)"
- name: Create release
id: create_release
if: ${{ needs.version_change.outputs.version_changed == '0' }}
run: |
git tag $current_version
git push --tags
Loading

0 comments on commit 702dd7d

Please sign in to comment.