Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Changing refresh stable branch from step to a job. Using github credentials bot so that we can push the changes. #5011

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,33 @@ jobs:
if: github.event.inputs.dry_run == 'false'
run: |
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release


- name: Updating `stable` branch after release.
update_stable_branch:
name: Update Stable Branch after release
runs-on: ubuntu-latest
needs: release
env:
GITHUB_TOKEN: ${{ github.event.inputs.token }}
GIT_AUTHOR_NAME: feast-ci-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: feast-ci-bot
GIT_COMMITTER_EMAIL: [email protected]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Git credentials
run: |
git config --global user.name "$GIT_AUTHOR_NAME"
git config --global user.email "$GIT_AUTHOR_EMAIL"

- name: Fetch all branches
run: git fetch --all

- name: Reset stable branch to match release branch
run: |
git fetch origin
# note that this checkout creates a branch called `stable` if it does not exist
git checkout -B stable
git reset --hard origin/${GITHUB_REF##*/}
git push -f origin stable
git checkout -B stable origin/${GITHUB_REF#refs/heads/}
git push origin stable --force
Loading