ci(brick): patch release action order #6
Workflow file for this run
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
# On pushing to a new release branch auto version bump is | |
# performed from latest release, changelog modified, | |
# versions modified (cocogitto) and a pull request | |
# for merging into main is created | |
name: CI/CD Release | |
on: | |
push: | |
branches: | |
- 'release/*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Conventional commits check | |
uses: oknozor/cocogitto-action@v3 | |
with: | |
check-latest-tag-only: true | |
- name: Auto bump version | |
run: | | |
cog bump --auto | |
- name: Create a new branch for the pull request | |
run: | | |
NEW_BRANCH="bot/release-${{ steps.release.outputs.version }}" | |
git checkout -b $NEW_BRANCH | |
- name: Commit and push changes | |
run: | | |
git status | |
git add . | |
git commit -m "chore(release): update changelog and version for ${{ steps.release.outputs.version }}" | |
git push origin "bot/release-${{ steps.release.outputs.version }}" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: 'Merge release ${{ steps.release.outputs.version }}' | |
title: '[RELEASE] Merge release ${{ steps.release.outputs.version }} into main' | |
body: 'This is an automated pull request to merge changes from the release ${{ steps.release.outputs.version }} into the main branch.' | |
branch: "bot/release-${{ steps.release.outputs.version }}" | |
base: main |