Skip to content

Commit

Permalink
Update create_version.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DARKDRAGON-LK authored Apr 9, 2024
1 parent 984ec62 commit 37b59e2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/create_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,22 @@ jobs:
id: read_counter
run: echo "::set-output name=counter::$(cat counter.txt || echo '0')"

- name: Determine if this is a merge commit
id: is_merge_commit
run: |
if git show --format=%P -s | grep -q " "; then
echo "::set-output name=is_merge::true"
else
echo "::set-output name=is_merge::false"
fi
- name: Increment merge counter
if: steps.is_merge_commit.outputs.is_merge == 'true'
id: increment_counter
run: |
counter=$((${{ steps.read_counter.outputs.counter }} + 1))
echo "::set-output name=counter::$counter"
- name: Update version file with date and merge counter
run: echo "3.0.0.${{ steps.current_date.outputs.date }}.${{ steps.increment_counter.outputs.counter }}" > VERSION.txt

Expand Down

0 comments on commit 37b59e2

Please sign in to comment.