Skip to content

Commit

Permalink
ci(brick): patch release action
Browse files Browse the repository at this point in the history
  • Loading branch information
esteinig committed Feb 10, 2024
1 parent 450722b commit edf97b3
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,29 @@ jobs:
uses: oknozor/cocogitto-action@v3
with:
check-latest-tag-only: true

- name: Auto-bump semantic version for release
id: release
uses: oknozor/cocogitto-action@v3
with:
release: true

- name: Create a new branch for the pull request
run: |
NEW_BRANCH="pr-release-${{ steps.release.outputs.version }}"
NEW_BRANCH="bot/release-${{ steps.release.outputs.version }}"
git checkout -b $NEW_BRANCH
- name: Check for changes
- name: Auto bump version and commit changes
run: |
cog bump --auto
git status
git add CHANGELOG.md
git status
git add .
git commit -m "chore(release): update changelog and version for ${{ steps.release.outputs.version }}"
- name: Commit changes
run: |
git diff --quiet || git commit -m "chore(release): update changelog and version for ${{ steps.release.outputs.version }}"
- name: Push changes
run: |
git push origin "pr-release-${{ 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: "pr-release-${{ steps.release.outputs.version }}"
branch: "bot/release-${{ steps.release.outputs.version }}"
base: main

0 comments on commit edf97b3

Please sign in to comment.