Skip to content

Commit

Permalink
Create a pull request per version build (and auto-approve it) (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ferraz-oliveira authored Sep 18, 2023
1 parent 7d0617e commit c5597a7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ kerl_configure
echo "::endgroup::"

pick_otp_vsn() {
git fetch --all --tags
global_OTP_VSN=undefined
while read -r release; do
prepare_git_tag "${release}"
Expand Down Expand Up @@ -167,11 +168,17 @@ _releases_update() {
echo "${global_FILENAME_NO_EXT} ${crc32} ${date}" >>_RELEASES
sort -o _RELEASES _RELEASES

release_name="release/${global_FILENAME_NO_EXT}"
git config user.name "GitHub Actions"
git config user.email "actions@user.noreply.github.com"
git add _RELEASES
git switch -c releases "${release_name}"
git commit -m "Update _RELEASES: ${global_FILENAME_NO_EXT}"
git push origin "${GITHUB_REF_NAME}"
git push origin "${release_name}"
pr=$(gh pr create -B main -t "Automation: update _RELEASES for ${global_FILENAME_NO_EXT}")
gh pr review "${pr}" -a
gh pr merge "${pr}" --admin --auto
git switch main
else
echo "Skipping branch ${GITHUB_REF} (runs in main alone)"
fi
Expand Down

0 comments on commit c5597a7

Please sign in to comment.