ReleasePost #32
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: ReleasePost | |
on: | |
workflow_run: | |
workflows: ["Publish"] | |
types: | |
- completed | |
jobs: | |
release_to_main: | |
name: Sync main with release | |
runs-on: ubuntu-22.04 | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
with: | |
ref: main | |
- name: Sync main | |
run: | | |
git pull | |
git merge --ff-only origin/release | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} | |
branch: main | |
update_changelog: | |
name: Update Changelog - Model | |
runs-on: ubuntu-22.04 | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
with: | |
ref: release | |
- name: Update changelog | |
run: ./gradlew changelog-add-model-section | |
- name: Commit changes | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add CHANGELOG.md | |
git commit -m "AUTOMATION: Changelog update" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} | |
branch: release | |
- name: Create Pull Request | |
uses: repo-sync/pull-request@v2 | |
with: | |
source_branch: "release" | |
destination_branch: "develop" | |
pr_title: "Release sync" | |
pr_body: "Sync with release branch after the release happened" | |
github_token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} |