Skip to content

Commit a11dcf4

Browse files
committed
ci: replace actions-ecosystem/action-get-merged-pull-request with gh pr list
Action has had no updates since 2020. Replaced with GitHub CLI which provides the same PR label data without an external dependency.
1 parent 8dbf3cc commit a11dcf4

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,21 @@ jobs:
2222
java-version: '17'
2323
distribution: temurin
2424

25-
- id: pr
26-
uses: actions-ecosystem/action-get-merged-pull-request@v1.0.1
27-
with:
28-
github_token: ${{ secrets.GITHUB_TOKEN }}
29-
3025
- name: Match semver label via bash
3126
id: match-label-bash
3227
run: |
33-
LABELS=$(cat <<-END
34-
${{ steps.pr.outputs.labels }}
35-
END
36-
)
37-
IFS='\n' read -ra LABEL <<< "$LABELS"
38-
for i in "${LABEL[@]}"; do
39-
echo $i
28+
LABELS=$(gh pr list --state merged --base main --limit 1 --json labels \
29+
--jq '.[] | .labels[].name')
30+
for i in $LABELS; do
4031
case $i in
4132
# Will just use the first occurence
4233
'major'|'minor'|'patch')
4334
echo "RELEASE_LABEL=$i" >> $GITHUB_OUTPUT
4435
break
4536
esac
4637
done
38+
env:
39+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4740

4841
- uses: zwaldowski/semver-release-action@v2
4942
with:

0 commit comments

Comments
 (0)