From 721043817adaa9052a132c2bdf206ea8926c6038 Mon Sep 17 00:00:00 2001 From: Dennis Dyatlov Date: Wed, 6 Nov 2024 14:22:49 +0000 Subject: [PATCH] pr via cli --- .github/workflows/rs-release.yml | 36 +++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) 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