diff --git a/.github/workflows/close-milestone-on-release.yml b/.github/workflows/close-milestone-on-release.yml index 78b7aa67..e1ed3e81 100644 --- a/.github/workflows/close-milestone-on-release.yml +++ b/.github/workflows/close-milestone-on-release.yml @@ -24,10 +24,14 @@ jobs: - name: Close Milestone run: | TAG=${{ inputs.releaseTag }} + echo TAG=$TAG MILESTONE_NAME=${TAG#v} + echo MILESTONE_NAME=$MILESTONE_NAME MILESTONE_ID="$(gh api repos/$OWNER/$REPO/milestones --jq '.[] | select(.title == "$MILESTONE_NAME") | .number')" + echo MILESTONE_ID=$MILESTONE_ID if [ $MILESTONE_ID ]; then gh api -X PATCH repos/$OWNER/$REPO/milestones/$MILESTONE_ID -f state='closed' + echo repo closed fi env: GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}