Skip to content

Commit

Permalink
release_test_temp
Browse files Browse the repository at this point in the history
Signed-off-by: Kshitiz Vijayvargiya <[email protected]>
  • Loading branch information
kshitiz-okahu committed Dec 5, 2024
1 parent 9a09dce commit 3afc9e4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/prepare-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
prereqs:
environment: GITHUB
environment: ArtifactPublish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -23,7 +23,7 @@ jobs:
env:
PRERELEASE_VERSION: ${{ github.event.inputs.prerelease_version }}
run: |
if [[ $GITHUB_REF_NAME != release_test_temp ]]; then
if [[ $GITHUB_REF_NAME != main ]]; then
echo this workflow should only be run against main
exit 1
fi
Expand All @@ -42,7 +42,7 @@ jobs:
fi
create-pull-request-against-release-branch:
environment: GITHUB
environment: ArtifactPublish
runs-on: ubuntu-latest
needs: prereqs
steps:
Expand Down Expand Up @@ -90,13 +90,17 @@ jobs:
run: |
message="Prepare release ${STABLE_VERSION}"
branch="monocle/prepare-release-${STABLE_VERSION}"
git config --global user.email "[email protected]"
git config --global user.name "you"
git config --global user.email "$USER_EMAIL"
git config --global user.name "$USER_NAME"
git commit -a -m "$message"
git push origin HEAD:$branch
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
--body "$message." \
--head $branch \
--base $RELEASE_BRANCH_NAME
create-pull-request-against-main:
environment: GITHUB
environment: ArtifactPublish
runs-on: ubuntu-latest
needs: [prereqs, create-pull-request-against-release-branch]
steps:
Expand Down Expand Up @@ -158,3 +162,7 @@ jobs:
git config --global user.name "$USER_NAME"
git commit -a -m "$message"
git push origin HEAD:$branch
gh pr create --title "$message" \
--body "$body" \
--head $branch \
--base main
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:

jobs:
release:
environment: ArtifactPublish
runs-on: ubuntu-latest
steps:
- run: |
Expand Down Expand Up @@ -176,12 +177,9 @@ jobs:
# run: .github/scripts/use-cla-approved-github-bot.sh

- name: Create pull request against main
shell: bash
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
USER_NAME: ${{ secrets.GIT_USER_NAME }}
run: |
message="Copy change log updates from $GITHUB_REF_NAME"
body="Copy log updates from \`$GITHUB_REF_NAME\`."
Expand All @@ -194,7 +192,9 @@ jobs:
fi
fi
git config --global user.email "[email protected]"
git config --global user.name "you"
git commit -a -m "$message"
git push origin HEAD:$branch
gh pr create --title "$message" \
--body "$body" \
--head $branch \
--base main

0 comments on commit 3afc9e4

Please sign in to comment.