Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! build: add create release proposal action
Browse files Browse the repository at this point in the history
  • Loading branch information
nodejs-github-bot committed Nov 18, 2024
1 parent 3171892 commit df3289b
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tools/actions/create-release.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
#!/bin/sh
#!/bin/bash

Check failure on line 1 in tools/actions/create-release.sh

View workflow job for this annotation

GitHub Actions / lint-sh

Invalid hashbang for /home/runner/work/node/node/tools/actions/create-release.sh (expected /bin/sh).

set -xe

RELEASE_DATE=$1
RELEASE_LINE=$2

if [ -z "$RELEASE_DATE" ] || [ -z "$RELEASE_LINE" ]; then
echo "Usage: $0 <RELEASE_DATE> <RELEASE_LINE>"
exit 1
fi

git config --local user.email "[email protected]"
git config --local user.name "Node.js GitHub Bot"

git node release --prepare --skipBranchDiff --yes
git node release --prepare --skipBranchDiff --yes --releaseDate "$RELEASE_DATE"
# We use it to not specify the branch name as it changes based on
# the commit list (semver-minor/semver-patch)
git config push.default current
awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" \
"doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" |\
gh pr create --body-file -
# TODO: ammend with proposal PR

# 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"

gh pr create --body-file "$TEMP_BODY"

# Clean up the temporary file
rm "$TEMP_BODY"

# TODO: amend with proposal PR

0 comments on commit df3289b

Please sign in to comment.