From 1a2c4070bc1c5b296d0fdd2d512399c37c976919 Mon Sep 17 00:00:00 2001 From: Adarsh Shah Date: Mon, 8 Jan 2024 11:35:38 -0500 Subject: [PATCH] adds windows version for fetching CLI version --- .github/workflows/tembo_release.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tembo_release.yml b/.github/workflows/tembo_release.yml index 10e9cf6d2..ed6fdf9fc 100644 --- a/.github/workflows/tembo_release.yml +++ b/.github/workflows/tembo_release.yml @@ -62,7 +62,6 @@ jobs: rustup target add ${{ matrix.target }} cargo build --release --target=${{ matrix.target }} cd target/${{ matrix.target }}/release - dir tar -czvf tembo.tar.gz tembo.exe git config --global --add safe.directory '*' @@ -74,11 +73,11 @@ jobs: cargo install cargo-get TEMBO_CLI_NAME=$(cargo-get package.name)-$(cargo-get package.version) echo "TEMBO_CLI_NAME=$TEMBO_CLI_NAME" >> $GITHUB_ENV - if: runner.os == 'macOS' || runner.os == 'Windows' + if: runner.os == 'macOS' - - name: CLI version Ubuntu + - name: CLI version Linux working-directory: ./tembo-cli - id: cli_version_ubuntu + id: cli_version_linux run: | set -x PKG_VERSION=$(awk -F ' = ' '$$1 ~ /version/ { gsub(/[\\"]/, "", $$2); printf("%s",$$2); exit; }' Cargo.toml) @@ -87,6 +86,16 @@ jobs: echo "TEMBO_CLI_NAME=$TEMBO_CLI_NAME" >> $GITHUB_ENV if: runner.os == 'Linux' + - name: CLI version Windows + working-directory: ./tembo-cli + id: cli_version_windows + run: | + + TEMBO_VERSION=$(target/${{ matrix.target }}/release/tembo.exe --version) + TEMBO_CLI_NAME=$($TEMBO_VERSION -replace ' ','-') + echo "TEMBO_CLI_NAME=$TEMBO_CLI_NAME" >> $GITHUB_ENV + if: runner.os == 'Windows' + - name: "Generate release changelog" id: changelog uses: mikepenz/release-changelog-builder-action@v4.1.0