Skip to content

Commit

Permalink
ci(release): update workflow (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
samikachai authored Dec 17, 2024
1 parent 5f5b46c commit 4a1ef2e
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,7 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin main
if git ls-remote --heads origin update-changelog | grep -q "update-changelog"; then
echo "Branch 'update-changelog' exists. Checking it out and rebasing..."
git checkout update-changelog
git pull origin update-changelog --rebase
else
echo "Branch 'update-changelog' does not exist. Creating it..."
git checkout -b update-changelog origin/main
fi
git checkout -b update-changelog origin/main
yarn commitizen init cz-conventional-changelog --save-dev --force --save-exact
HEADER=$(awk '/^---/{exit} {print}' CHANGELOG.md)
Expand Down Expand Up @@ -96,15 +88,7 @@ jobs:
- name: Commit changelog changes
run: |
git add CHANGELOG.md
if git diff --cached --quiet; then
echo "No changes in CHANGELOG.md. Skipping commit."
exit 0
fi
git commit -m "chore: update changelog for ${{ github.ref }}"
git fetch origin main
git rebase origin/main
git push -u origin update-changelog --force
- name: Create a Pull Request to update the changelog file
Expand Down

0 comments on commit 4a1ef2e

Please sign in to comment.