Skip to content

Commit

Permalink
feat(ci): update publish-cli.yml to handle tag versions
Browse files Browse the repository at this point in the history
Modify the publish-cli.yml workflow to correctly extract the version from the git tag, removing the leading "v" prefix. This ensures the
correct version is used for the published artifact.
  • Loading branch information
esolitos authored and gitbutler-client committed Aug 30, 2024
1 parent e8a5e1a commit 819ddc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
id: meta
run: |
if [[ "${{ github.event_name }}" == "push" && "${{ startswith(github.ref, 'refs/tags/v') }}" == "true" ]]; then
BUILD_VERSION="${{ github.ref_name }}"
# Remove the "v" prefix from the tag.
BUILD_VERSION="${GIT_REF_NAME#v}"
else
BUILD_VERSION="0.0.0-dev_${{ github.run_number }}"
fi
Expand Down

0 comments on commit 819ddc3

Please sign in to comment.