Skip to content

Commit

Permalink
fix:automation
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 6, 2024
1 parent f35f127 commit 4301f4f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/publish_alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,29 @@ jobs:
run: |
python -m pip install build wheel
- name: Debug PR Labels
- name: Debug GitHub Event
run: |
echo "Labels: ${{ github.event.pull_request.labels[*].name }}"
echo "GitHub Event Payload:"
echo "${{ toJson(github.event) }}"
echo "Labels in Pull Request:"
echo "${{ toJson(github.event.pull_request.labels) }}"
- name: Determine version bump
id: version_bump
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
LABELS=$(echo "${{ github.event.pull_request.labels[*].name }}" | tr ' ' '\n')
LABELS=$(jq -r '.pull_request.labels[].name' <<< "${{ toJson(github.event) }}")
echo "Labels: $LABELS"
else
echo "Not a pull request, defaulting to alpha."
echo "::set-output name=part::alpha"
fi
MAJOR=0
MINOR=0
BUILD=0
for label in $LABELS; do
if [ "$label" == "breaking" ]; then
MAJOR=1
Expand All @@ -64,7 +68,7 @@ jobs:
BUILD=1
fi
done
if [ $MAJOR -eq 1 ]; then
echo "::set-output name=part::major"
elif [ $MINOR -eq 1 ]; then
Expand Down

0 comments on commit 4301f4f

Please sign in to comment.