Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,28 @@ jobs:
echo "new-version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
echo "New version: $NEW_VERSION"

- name: Commit version bump
id: commit-version-bump
env:
NEW_VERSION: ${{ steps.apply-changesets.outputs.new-version }}
- name: Check for version bump changes
id: check-changes
run: |
git add -A
if git diff --staged --quiet; then
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
echo "committed=false" >> "$GITHUB_OUTPUT"
else
git commit -m "chore: release $NEW_VERSION [version bump] [skip ci]"
git push origin main
echo "committed=true" >> "$GITHUB_OUTPUT"
fi

- name: Commit version bump
id: commit-version-bump
if: steps.check-changes.outputs.committed == 'true'
uses: planetscale/ghcommit-action@25309d8005ac7c3bcd61d3fe19b69e0fe47dbdde # v0.2.20
with:
commit_message: "chore: release ${{ steps.apply-changesets.outputs.new-version }} [version bump] [skip ci]"
repo: ${{ github.repository }}
branch: main
env:
GITHUB_TOKEN: ${{ steps.releaser.outputs.token }}
- name: Create GitHub release
if: steps.commit-version-bump.outputs.committed == 'true'
if: steps.commit-version-bump.outputs.commit-hash != ''
env:
GH_TOKEN: ${{ steps.releaser.outputs.token }}
NEW_VERSION: ${{ steps.apply-changesets.outputs.new-version }}
Expand Down
Loading