Files
BetterDesk/.github/workflows/version-bump-dev.yml
UNITRONIX feb3d19987 chore: update .gitignore and Gitleaks configuration, enhance CI workflows
- Updated .gitignore to include new binary paths and retain .gitkeep.
- Modified Gitleaks configuration to ignore additional directories.
- Adjusted CI workflows to prevent execution on version bump pushes and improved version bump handling in scripts.
- Bumped BetterDesk Console Manager version to 3.3.136 in betterdesk.sh and related scripts.
2026-07-13 17:34:41 +02:00

63 lines
2.0 KiB
YAML

# =============================================================================
# BetterDesk — automatic patch version bump on dev branch
# =============================================================================
# Every push to dev (except [version-bump] commits) bumps product version +0.0.1
# across Tier 1/2 files via scripts/bump-version.js.
# =============================================================================
name: Version Bump (dev)
on:
push:
branches: [dev]
permissions:
contents: write
concurrency:
group: version-bump-dev
cancel-in-progress: false
jobs:
bump-patch:
if: "!contains(github.event.head_commit.message, '[version-bump]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Bump patch version
id: bump
run: |
node scripts/bump-version.js --patch
NEW_VERSION=$(cat VERSION | tr -d '\n')
echo "version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
- name: Commit and push version bump
env:
NEW_VERSION: ${{ steps.bump.outputs.version }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add $(node scripts/bump-version.js --list-paths)
if git diff --cached --quiet; then
echo "No version files changed — skipping commit"
exit 0
fi
git commit -m "chore: bump version to ${NEW_VERSION} [version-bump]"
for attempt in 1 2 3 4 5; do
if git push; then
exit 0
fi
echo "Push failed (attempt ${attempt}/5) — rebasing and retrying..."
git pull --rebase origin dev
done
echo "Version bump push failed after retries"
exit 1