Twitter-oss: Prepare OSS libraries for release 24.2.0 #161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: merge-release | |
env: | |
API_USER: ${{ secrets.API_USER }} | |
# Merges the 'develop' branch into release on pushes to 'develop' | |
defaults: | |
run: | |
shell: bash | |
on: | |
push: | |
branches: [develop] | |
jobs: | |
merge-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.3.4 | |
with: | |
fetch-depth: 0 | |
ref: develop | |
- name: setup/git | |
run: | | |
git config --global user.email "${API_USER}@twitter.com" | |
git config --global user.name "$API_USER" | |
git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/* | |
- name: merge | |
run: | | |
develop_head=$(git rev-parse HEAD) | |
git fetch --no-tags --prune origin +refs/heads/*:refs/remotes/origin/* | |
git checkout release && git merge "$develop_head" && git push -f origin release |