Skip to content

Commit

Permalink
fixup! fixup! build: add create release proposal action
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Nov 22, 2024
1 parent 63c8308 commit f764790
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tools/actions/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,9 @@ git push
TITLE=$(awk "/^## ${RELEASE_DATE}/ { print substr(\$0, 4) }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md")

# Use a temporary file for the PR body
TEMP_BODY=$(mktemp)
awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" > "$TEMP_BODY"
TEMP_BODY="$(awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md")"

gh pr create --title "$TITLE" --body-file "$TEMP_BODY" --base "v$RELEASE_LINE.x"

# Dynamically get the repository (owner/repo) and branch
REPO=$(git remote get-url origin | sed -E 's|^.*github.com[/:]([^/]+/[^.]+)(\.git)?$|\1|')
BRANCH=$(git branch --show-current)

# Get the PR URL for the current branch in the repository
PR_URL=$(gh pr list --repo "$REPO" --head "$BRANCH" --json url -q ".[0].url")
PR_URL="$(gh pr create --title "$TITLE" --body "$TEMP_BODY" --base "v$RELEASE_LINE.x")"

# Get the last commit message
LAST_COMMIT_MSG=$(git log -1 --pretty=%B)
Expand Down

0 comments on commit f764790

Please sign in to comment.