diff --git a/.github/workflows/rs-release.yml b/.github/workflows/rs-release.yml index b39e7101..bc86250f 100644 --- a/.github/workflows/rs-release.yml +++ b/.github/workflows/rs-release.yml @@ -195,20 +195,32 @@ jobs: git tag -a "$R_TAG" -m "Release v${{ needs.prepare.outputs.r_version }}" git push origin "$R_TAG" + - name: Install GitHub CLI + run: sudo apt-get install -y gh + - name: Create Sync PR run: | - echo "GH_USER_NAME=${GITHUB_USER_NAME}" - echo "MAIN_BRANCH=${MAIN_BRANCH}" - curl -X POST \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github+json" \ - https://api.github.com/repos/${{ github.repository }}/pulls \ - -d '{ - "title": "chore: sync release v${{ needs.prepare.outputs.r_version }} to master", - "head": "${{ needs.prepare.outputs.rc_branch }}", - "base": "master", - "body": "This PR was created by GitHub Actions" - }' + echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token + gh pr create \ + --title "chore: sync release v${{ needs.prepare.outputs.r_version }} to master" \ + --body "This PR was created by GitHub Actions" \ + --base master \ + --head ${{ needs.prepare.outputs.rc_branch }} + + # - name: Create Sync PR + # run: | + # echo "GH_USER_NAME=${GITHUB_USER_NAME}" + # echo "MAIN_BRANCH=${MAIN_BRANCH}" + # curl -X POST \ + # -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + # -H "Accept: application/vnd.github+json" \ + # https://api.github.com/repos/${{ github.repository }}/pulls \ + # -d '{ + # "title": "chore: sync release v${{ needs.prepare.outputs.r_version }} to master", + # "head": "${{ needs.prepare.outputs.rc_branch }}", + # "base": "master", + # "body": "This PR was created by GitHub Actions" + # }' - name: Create Draft Release uses: softprops/action-gh-release@v2