Skip to content

Commit

Permalink
adding git short hash to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsm authored Nov 24, 2024
1 parent 385f14d commit 65a0eb9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 65a0eb9

Please sign in to comment.