Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Idane committed Jul 19, 2023
1 parent 30e6848 commit 1b5462e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/actions/determine-version/action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
name: 'Determine Version'
description: 'Determine the current version'
outputs:
version: ${{ steps.determine-version.outputs.version }}
version:
description: 'The current version'
value: ${{ steps.determine-version.outputs.version }}
runs:
using: 'composite'
steps:
- name: Checkout git repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Determine version
id: determine-version
shell: sh
run: |
set +e
EXACT_DESCRIBE_RESULT=$(git describe --tags --exact-match)
EXACT_MATCH_EXIT_CODE=$?
set -e
if [ $EXACT_MATCH_EXIT_CODE -eq 0 ]; then
echo "version=${DESCRIBE_RESULT}" >> $GITHUB_OUTPUT
else
DESCRIBE_RESULT=$(git describe --tags)
echo "version=${DESCRIBE_RESULT}-snapshot" >> $GITHUB_OUTPUT
fi
fi
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- package.json
- package-lock.json
- .github/workflows/publish.yml
- .github/actions/**

jobs:
publish:
Expand Down

0 comments on commit 1b5462e

Please sign in to comment.