From 65a0eb92bfa095e0e4975abac3d1ee62a257ae3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Muhammet=20=C5=9E=C3=BCkr=C3=BC=20Demir?= <41967334+dsm@users.noreply.github.com> Date: Sun, 24 Nov 2024 18:37:21 +0300 Subject: [PATCH] adding git short hash to CI. --- .github/workflows/deploy.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 14a4b1a08..b6ead75d8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,7 @@ jobs: runs-on: ubuntu-latest outputs: version: ${{ steps.read_version.outputs.version }} + short_hash: ${{ steps.read_version.outputs.short_hash }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -41,8 +42,16 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Print version - run: echo "Qucs-S version is ${{ env.VERSION }}" + # Get the short hash of the current commit + SHORT_HASH=$(git rev-parse --short=8 HEAD) + + echo "SHORT_HASH=$SHORT_HASH" >> $GITHUB_ENV + echo "short_hash=$SHORT_HASH" >> $GITHUB_OUTPUT + + - name: Print version and hash + run: | + echo "Qucs-S version is ${{ env.VERSION }}" + echo "Qucs-S short hash is ${{ env.SHORT_HASH }}" build-linux-qt5: runs-on: ubuntu-22.04