Skip to content

Commit

Permalink
Merge pull request #54 from buildersoftio/v1/main
Browse files Browse the repository at this point in the history
update sdk-release
  • Loading branch information
eneshoxha authored Dec 10, 2024
2 parents a10024f + 9211053 commit 6bdf3e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ jobs:
id: versioning
if: ${{ steps.check_merge.outputs.merged == 'true' }}
run: |
labels=$(echo "${{ toJSON(github.event.pull_request.labels) }}" | jq -r '.[].name')
PR_LABELS="${{ toJSON(github.event.pull_request.labels) }}"
# Parse PR labels using jq
labels=$(jq -r '.[].name' <<< "$PR_LABELS")
echo "PR labels: $labels"
increment="patch"
if echo "$labels" | grep -q "feature"; then
increment="minor"
Expand Down Expand Up @@ -76,6 +79,7 @@ jobs:
major=${versionParts[0]}
minor=${versionParts[1]}
patch=${versionParts[2]}
if [ "$increment" == 'minor' ]; then
minor=$((minor + 1))
patch=0
Expand All @@ -85,6 +89,7 @@ jobs:
echo "Unknown increment type: $increment"
exit 1
fi
newVersion="$major.$minor.$patch"
echo "New version: $newVersion"
echo "newVersion=$newVersion" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 6bdf3e7

Please sign in to comment.