diff --git a/.github/workflows/rs-release.yml b/.github/workflows/rs-release.yml index 95615fbf..cd8cdad4 100644 --- a/.github/workflows/rs-release.yml +++ b/.github/workflows/rs-release.yml @@ -201,40 +201,28 @@ jobs: run: sudo apt-get install -y gh - name: Create Sync PR + id: sync_pr run: | echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token - gh pr create \ + PR_URL=$(gh pr create \ --title "release: sync $R_NAME 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" - # }' + --head ${{ needs.prepare.outputs.rc_branch }}) + echo "url=$PR_URL" >> $GITHUB_OUTPUT - name: Create Draft Release uses: softprops/action-gh-release@v2 with: - name: $R_NAME + name: ${{ env.R_NAME }} tag_name: ${{ needs.prepare.outputs.r_tag }} draft: true body: | - !!! This is a draft release. - !!! Please review the changes and publish the release. - !!! Check this [PR] + :exclamation: This is a draft release. + :exclamation: Please review the changes and publish the release. + :exclamation: Please also check this [PR](${{ steps.sync_pr.outputs.url }}) to sync the changes to master. generate_release_notes: true + append_body: true fail_on_unmatched_files: true files: | ./assets/sails_idl_parser/sails_idl_parser.wasm