Skip to content

Commit

Permalink
pr via cli
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisInSky committed Nov 6, 2024
1 parent 90477e8 commit 7210438
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/rs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7210438

Please sign in to comment.