mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 05:12:33 +00:00
* chore: add CI secrets management and local testing script - Added ci-secrets.example.json to provide a template for CI secrets configuration. - Introduced test-ci-local.sh script to facilitate local testing of the package-and-publish workflow using act. - Updated .gitignore to exclude the actual ci-secrets.json file containing sensitive tokens. * chore: enhance local testing and environment loading scripts - Added scripts to load environment variables from .env and JSON files, improving local development setup. - Introduced ci-event.json to simulate GitHub event payloads for local CI testing. - Updated test-ci-local.sh to utilize the new event JSON for better integration with local testing workflows. - Modified .gitignore to include ci-secrets.local.json for local secret management. * chore: enhance environment loading and improve V8 memory management - Updated load-env.sh to conditionally load ci-secrets.local.json and set APPLE_PASSWORD for notarization. - Introduced a delay in auto-starting skills to prevent memory spikes during initialization. - Adjusted V8 runtime memory settings to minimize initial heap allocation, reducing the risk of OOM errors. * chore: update version bump workflow to modify tauri.conf.json - Changed the version update process to reflect changes in tauri.conf.json instead of Cargo.toml. - Adjusted the commit message to indicate the inclusion of tauri.conf.json in the version bump process. * chore: migrate from V8 to QuickJS runtime and update related configurations - Replaced V8 runtime references with QuickJS throughout the codebase, including updates to initialization and error handling. - Modified package.json to change the build command for macOS to source environment variables correctly. - Updated Cargo.toml to remove deno_core dependency and include rquickjs with appropriate features. - Cleaned up unused V8-related code and comments in the runtime modules. - Adjusted skill manifest checks to support QuickJS compatibility. * refactor: implement QuickJS runtime and remove V8 references - Replaced V8 engine with QuickJS in the runtime module, updating related imports and initialization logic. - Introduced new `qjs_engine.rs` and `qjs_skill_instance.rs` files to handle QuickJS-specific functionality. - Removed the deprecated `v8_skill_instance.rs` and associated V8-related code. - Updated JavaScript bootstrap code to align with QuickJS operations and APIs. - Adjusted documentation and comments to reflect the transition to QuickJS. * refactor: update IdbStorage to use parking_lot::Mutex for improved concurrency - Changed the connection management in IdbStorage from RwLock to parking_lot::Mutex for better performance. - Updated related methods to reflect the new locking mechanism, enhancing the efficiency of database operations. - Adjusted the IdbOpenResult struct to include serde::Serialize for potential serialization needs. * refactor: update QuickJS skill instance and timer management - Modified memory limit and stack size settings in QjsSkillInstance to be asynchronous, improving performance. - Cleaned up imports in qjs_ops.rs by removing unused dependencies and enhancing function definitions for clarity. - Refactored timer management functions for better readability and efficiency, including renaming and restructuring comments. * chore: update package.json scripts and clean up build.rs - Added a new script for running the Tauri app with environment variable loading. - Simplified the macOS development command to use a dedicated build script. - Removed unnecessary environment variable logging from build.rs to streamline the build process. - Cleaned up commented-out sections in the GitHub Actions workflow for Android packaging.
95 lines
3.2 KiB
YAML
95 lines
3.2 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 from package.json
|
|
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
|
export CURRENT_VERSION
|
|
echo "Current version: $CURRENT_VERSION"
|
|
|
|
# Compute new version (minor bump: x.y.z -> x.(y+1).0)
|
|
NEW_VERSION=$(node -e "
|
|
const v = process.env.CURRENT_VERSION.split('.').map(Number);
|
|
console.log([v[0], (v[1] || 0) + 1, 0].join('.'));
|
|
")
|
|
export NEW_VERSION
|
|
echo "New version: $NEW_VERSION"
|
|
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
|
|
# Update package.json
|
|
node -e "
|
|
const p = require('./package.json');
|
|
p.version = process.env.NEW_VERSION;
|
|
require('fs').writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');
|
|
"
|
|
|
|
# Update tauri.conf.json to match
|
|
node -e "
|
|
const c = require('./src-tauri/tauri.conf.json');
|
|
c.version = process.env.NEW_VERSION;
|
|
require('fs').writeFileSync('src-tauri/tauri.conf.json', JSON.stringify(c, null, 2) + '\n');
|
|
"
|
|
|
|
# Single commit and tag for package.json and tauri.conf.json
|
|
git add package.json src-tauri/tauri.conf.json
|
|
git commit -m "chore: bump version to $NEW_VERSION [skip ci]"
|
|
git tag "v$NEW_VERSION"
|
|
|
|
- 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
|