Skip to content

Commit

Permalink
ci(brick): fix release action commit flow
Browse files Browse the repository at this point in the history
  • Loading branch information
esteinig committed Feb 10, 2024
1 parent c1ca0ce commit d40f58c
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,28 @@ jobs:
with:
check-latest-tag-only: true


- name: Get release version
- name: Generate release version
id: release
run: |
VERSION=$(cog bump --dry-run --auto)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Bump version
run: |
cog bump --auto
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- 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
- name: Auto bump version and commit
run: |
git status
git add .
git commit -m "chore(release): update changelog and version for ${{ steps.release.outputs.version }}"
cog bump --auto
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.'
body: 'This is an automated pull request to merge changes from the release/${{ steps.release.outputs.version }} into main'
branch: "bot/release-${{ steps.release.outputs.version }}"
base: main

0 comments on commit d40f58c

Please sign in to comment.