mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 15:26:09 +00:00
chore: bootstrap Claude setup
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2068890cca
commit
5b3737ad3b
8 files changed
+127
No files matched your search
@@ -0,0 +1,41 @@
|
||||
name: version
|
||||
on:
|
||||
push:
|
||||
branches: [development, main]
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
bump:
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && github.actor != 'github-actions[bot]' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Bump version
|
||||
id: bump
|
||||
run: |
|
||||
set -euo pipefail
|
||||
IFS=. read -r MA MI PA < VERSION
|
||||
branch="${GITHUB_REF_NAME}"
|
||||
if [ "$branch" = main ] && [ "$(git rev-list --parents -n1 HEAD | wc -w)" = 3 ] \
|
||||
&& git merge-base --is-ancestor HEAD^2 origin/development; then
|
||||
MI=$((MI+1)); PA=0
|
||||
else
|
||||
PA=$((PA+1))
|
||||
fi
|
||||
echo "$MA.$MI.$PA" > VERSION
|
||||
echo "v=$MA.$MI.$PA" >> "$GITHUB_OUTPUT"
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add VERSION
|
||||
git commit -m "chore(release): v${{ steps.bump.outputs.v }} [skip ci]"
|
||||
git push origin "HEAD:${GITHUB_REF_NAME}"
|
||||
if [ "${GITHUB_REF_NAME}" = main ]; then
|
||||
git fetch origin development
|
||||
git checkout -B development origin/development
|
||||
git merge --no-edit origin/main
|
||||
git push origin development
|
||||
fi
|
||||
Reference in new issue
Block a user