diff --git a/.github/actions/generate-version/action.yml b/.github/actions/generate-version/action.yml index 4f176fcb91..6b84aac2f3 100644 --- a/.github/actions/generate-version/action.yml +++ b/.github/actions/generate-version/action.yml @@ -17,8 +17,10 @@ runs: VERSION: ${{ github.ref_name }} run: echo "VERSION=${VERSION}" >> "${GITHUB_ENV}" - # When a tag is not pushed, then the version is extracted from the - # BuildInfo.cpp file and the shortened commit hash appended to it. + # When a tag is not pushed, then the version (e.g. 1.2.3-b0) is extracted + # from the BuildInfo.cpp file and the shortened commit hash appended to it. + # We use a plus sign instead of a hyphen because Conan recipe versions do + # not support two hyphens. - name: Generate version for non-tag event if: ${{ github.event_name != 'tag' }} shell: bash @@ -32,7 +34,7 @@ runs: echo 'Appending shortened commit hash to version.' SHA='${{ github.sha }}' - VERSION="${VERSION}-${SHA:0:7}" + VERSION="${VERSION}+${SHA:0:7}" echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"