diff --git a/.github/workflows/release-build-and-push-to-GH-releases.yml b/.github/workflows/release-build-and-push-to-GH-releases.yml index e4955e9ee..0a41c1272 100644 --- a/.github/workflows/release-build-and-push-to-GH-releases.yml +++ b/.github/workflows/release-build-and-push-to-GH-releases.yml @@ -33,6 +33,9 @@ jobs: - name: Generate tag utilities id: TAG_UTIL run: | + SHORT_SHA1=$(git rev-parse --short HEAD) + echo "short_sha1=$SHORT_SHA1" >> $GITHUB_OUTPUT + if [[ ${GITHUB_REF#refs/heads/} =~ 7.* ]]; then echo "chectl_version=$(cat VERSION)" >> $GITHUB_OUTPUT echo "gh_release_name=$(cat VERSION)" >> $GITHUB_OUTPUT @@ -40,9 +43,8 @@ jobs: echo "MM_ANNOUNCE=true" >> "$GITHUB_ENV" elif [[ ${GITHUB_REF#refs/heads/} =~ main ]]; then CURRENT_DAY=$(date +'%Y%m%d') - SHORT_SHA1=$(git rev-parse --short HEAD) echo "gh_tag=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT - echo "chectl_version=0.0.$CURRENT_DAY-next" >> $GITHUB_OUTPUT + echo "chectl_version=0.0.$CURRENT_DAY-next.$SHORT_SHA1" >> $GITHUB_OUTPUT echo "gh_release_name=0.0.$CURRENT_DAY-next.$SHORT_SHA1" >> $GITHUB_OUTPUT echo "MM_ANNOUNCE=false" >> "$GITHUB_ENV" fi @@ -60,6 +62,11 @@ jobs: TARGETS=linux-arm,linux-x64,linux-s390x,linux-ppc64le,darwin-x64,darwin-arm64,win32-x64,win32-x86 yarn prepack && yarn pack-binaries --targets=$TARGETS + + # Rename binaries to remove the sha1 from their names + for file in ./dist/*; do + mv "$file" "${file/-v${{ steps.TAG_UTIL.outputs.chectl_version }}-${{ steps.TAG_UTIL.outputs.short_sha1 }}/}" + done - name: Create Release and push artifacts uses: softprops/action-gh-release@v1 with: diff --git a/yarn.lock b/yarn.lock index 78c7bc370..93e4f9039 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3276,7 +3276,7 @@ detect-newline@^3.0.0: "devworkspace-operator@https://github.com/devfile/devworkspace-operator#main": version "0.0.0" - resolved "https://github.com/devfile/devworkspace-operator#58ada48c0ec852fd5670868edb4702d0e4ed81e3" + resolved "https://github.com/devfile/devworkspace-operator#9450aa8894047f242cb0b40ce8e0e60df13ea27c" dezalgo@^1.0.0: version "1.0.4" @@ -3337,7 +3337,7 @@ ecc-jsbn@~0.1.1: "eclipse-che-operator@https://github.com/eclipse-che/che-operator#main": version "0.0.0" - resolved "https://github.com/eclipse-che/che-operator#5d702069dde221cfcfffeddca5b9f6119e76c15d" + resolved "https://github.com/eclipse-che/che-operator#5f0843ab268a69a0c3ad6e95f56d0d700e47e90f" editorconfig@^0.15.0: version "0.15.3" @@ -3826,7 +3826,7 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fancy-test@^2.0.12, fancy-test@^2.0.25: +fancy-test@^2.0.25: version "2.0.25" resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-2.0.25.tgz#9a0578a4820460cb2c1250dfb48d4664ca59c83a" integrity sha512-4OKW+SC62aP3Y19YlCWxjKJD0iW4kjLqUvdd9OaW1lM7Co/FX3PTi2NHguzsj2vmPs/6mMITKu0saYAr2uZA4g==