Files
openhuman/.github/workflows/version-bump.yml
T
Steven Enamakel 47193efad7 Update skills submodule and add GitHub Actions workflows for CI/CD
- Updated the skills submodule to the latest commit, ensuring alignment with project dependencies.
- Introduced new GitHub Actions workflows:
  - `build.yml` for building the Tauri app.
  - `test.yml` for running unit tests with coverage.
  - `pr-protection.yml` to enforce PR title conventions and branch protection.
  - `version-bump.yml` for automated version bumping on main branch pushes.

These changes enhance the CI/CD pipeline, improve code quality checks, and ensure the project remains up-to-date with the latest skills integration.
2026-02-02 05:18:05 +05:30

72 lines
2.4 KiB
YAML

name: Version Bump
on:
push:
branches:
- main
permissions:
contents: write
jobs:
version-bump:
runs-on: ubuntu-latest
environment: Production
# Skip if this is a version bump commit to avoid infinite loop
if: "!contains(github.event.head_commit.message, 'chore: bump version') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Generate GitHub App token
id: app-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.XGITHUB_APP_ID }}
private_key: ${{ secrets.XGITHUB_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
# Use GitHub App token for checkout and push operations
# This token has bypass permissions if the GitHub App is configured with them
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Configure Git
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Update remote URL to use GitHub App token for all git operations
git remote set-url origin https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
- name: Pull latest changes
run: |
# Ensure we're on main and pull latest changes to avoid push conflicts
git checkout main
git pull origin main --ff-only
- name: Bump version
id: version
run: |
# Get current version
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "Current version: $CURRENT_VERSION"
# Bump minor version (creates commit and tag)
# The commit message includes [skip ci] to prevent triggering this workflow again
NEW_VERSION=$(npm version minor -m "chore: bump version to %s [skip ci]" | sed 's/v//')
echo "New version: $NEW_VERSION"
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Push changes
run: |
# Push to main and tags using GitHub App token (remote URL already configured)
git push origin main
git push origin --tags