Skip to content

Commit

Permalink
chore: ci updates
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Jul 31, 2024
1 parent 3180439 commit 6fcb7b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ jobs:
export PKG_CONFIG_ALLOW_CROSS=1
cargo build --release --features metal --target ${{ matrix.target }}
# get the current tag or take latest (in the case of a workflow dispatch)
- name: Set version
run: |
VERSION=${GITHUB_REF#refs/tags/}
if [[ $VERSION != v* ]]; then
VERSION=$(git describe --tags --abbrev=0)
git fetch --tags
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
fi
VERSION=${VERSION#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
Expand Down

0 comments on commit 6fcb7b0

Please sign in to comment.