Skip to content

Commit

Permalink
modified: .github/workflows/package-release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
yuleib committed May 11, 2023
1 parent 3d1cbde commit f4dcde5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/package-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
- name: Determine version bump
id: version_bump
run: |
tag=${{ steps.latest_tag.outputs.latest_tag }}
commit_range="${tag}..HEAD"
tag_name=${{ steps.latest_tag.outputs.latest_tag }}
commit_range="${tag_name}..HEAD"
major_bump=$(git diff --name-only $commit_range | grep -E '^major-.*\.md$' | wc -l)
minor_bump=$(git diff --name-only $commit_range | grep -E '^minor-.*\.md$' | wc -l)
if [ $major_bump -gt 0 ]; then
Expand All @@ -81,16 +81,16 @@ jobs:
- name: Increment tag version
id: increment_tag
run: |
tag=${{ steps.latest_tag.outputs.latest_tag }}
tag_name=${{ steps.latest_tag.outputs.latest_tag }}
bump_type=${{ steps.version_bump.outputs.bump_type }}
if [ $bump_type == "major" ]; then
tag=$(echo $tag | awk -F. '{$1++;$2=0;$3=0;print $0}')
tag_name=$(echo $tag_name | awk -F. '{$1++;$2=0;$3=0;print $0}')
elif [ $bump_type == "minor" ]; then
tag=$(echo $tag | awk -F. '{$2++;$3=0;print $0}')
tag_name=$(echo $tag_name | awk -F. '{$2++;$3=0;print $0}')
else
tag=$(echo $tag | awk -F. '{$3++;print $0}')
tag_name=$(echo $tag_name | awk -F. '{$3++;print $0}')
fi
echo "{name}={$tag}" >> $GITHUB_OUTPUT
echo "{name}={$tag_name}" >> $GITHUB_OUTPUT
# - name: Extract version
# id: extract_version
Expand Down

0 comments on commit f4dcde5

Please sign in to comment.