Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

Add auto-versioning workflow (Major.Release.Build)

Adam Eivy465eb50981a5
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c7ee98fea3..a951147d03 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,6 +9,8 @@ on:
jobs:
test:
runs-on: ubuntu-latest
+ # Skip if commit message contains [skip ci]
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
@@ -44,6 +46,7 @@ jobs:
lint:
runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v4
@@ -59,3 +62,43 @@ jobs:
- name: Check for syntax errors
run: node --check server/index.js
+
+ bump-build:
+ runs-on: ubuntu-latest
+ needs: [test, lint]
+ # Only run on push to dev (not PRs), and skip if already a version bump commit
+ if: github.event_name == 'push' && github.ref == 'refs/heads/dev' && !contains(github.event.head_commit.message, '[skip ci]')
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Configure git
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+
+ - name: Bump patch version
+ run: |
+ # Get current version
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
+
+ # Split into parts
+ MAJOR=$(echo $CURRENT_VERSION | cut -d. -f1)
+ MINOR=$(echo $CURRENT_VERSION | cut -d. -f2)
+ PATCH=$(echo $CURRENT_VERSION | cut -d. -f3)
+
+ # Increment patch
+ NEW_PATCH=$((PATCH + 1))
+ NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
+
+ # Update package.json files
+ npm version $NEW_VERSION --no-git-tag-version
+ cd client && npm version $NEW_VERSION --no-git-tag-version && cd ..
+ cd server && npm version $NEW_VERSION --no-git-tag-version && cd ..
+
+ # Commit and push
+ git add package.json package-lock.json client/package.json server/package.json
+ git commit -m "build: bump version to $NEW_VERSION [skip ci]"
+ git push
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index baa5d4b595..90587ef93e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,20 +7,25 @@ on:
jobs:
release:
runs-on: ubuntu-latest
-
- # Only run if the commit message doesn't already contain [skip release]
- if: "!contains(github.event.head_commit.message, '[skip release]')"
+ # Skip version bump commits
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
+ - name: Configure git
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+
- name: Get version from package.json
id: package-version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
@@ -41,8 +46,8 @@ jobs:
# Get the previous tag or use initial commit
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)
- # Generate changelog from commits
- CHANGELOG=$(git log $PREV_TAG..HEAD --pretty=format:"- %s" --no-merges | head -50)
+ # Generate changelog from commits (exclude [skip ci] commits)
+ CHANGELOG=$(git log $PREV_TAG..HEAD --pretty=format:"- %s" --no-merges | grep -v "\[skip ci\]" | head -50)
# Handle multiline output
echo "changelog<<EOF" >> $GITHUB_OUTPUT
@@ -72,3 +77,31 @@ jobs:
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Prep dev branch for next release
+ if: steps.tag-check.outputs.exists == 'false'
+ run: |
+ # Get current version
+ CURRENT_VERSION=${{ steps.package-version.outputs.version }}
+
+ # Split into parts
+ MAJOR=$(echo $CURRENT_VERSION | cut -d. -f1)
+ MINOR=$(echo $CURRENT_VERSION | cut -d. -f2)
+
+ # Increment minor, reset patch to 0
+ NEW_MINOR=$((MINOR + 1))
+ NEW_VERSION="$MAJOR.$NEW_MINOR.0"
+
+ # Checkout dev branch
+ git fetch origin dev
+ git checkout dev
+
+ # Update package.json files
+ npm version $NEW_VERSION --no-git-tag-version
+ cd client && npm version $NEW_VERSION --no-git-tag-version && cd ..
+ cd server && npm version $NEW_VERSION --no-git-tag-version && cd ..
+
+ # Commit and push
+ git add package.json package-lock.json client/package.json server/package.json
+ git commit -m "build: prep v$NEW_VERSION for next release [skip ci]"
+ git push origin dev
diff --git a/PLAN.md b/PLAN.md
index 617cc99f04..c51071b31e 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -43,12 +43,19 @@ pm2 logs
### Git Workflow
- **`dev`** - Development branch, all features branch from here
- **`main`** - Production branch, releases only
-- **Release Process**:
- 1. Work on `dev` branch (or feature branches merged to `dev`)
- 2. Create PR from `dev` to `main`
- 3. CI runs tests on PR
- 4. On merge, GitHub Action creates a release with version from `package.json`
-- Bump version in `package.json` before merging to `main`
+
+### Versioning (Major.Release.Build)
+- **Major** - Manually incremented for breaking changes
+- **Release** (minor) - Auto-incremented when merging dev → main
+- **Build** (patch) - Auto-incremented on every successful dev CI run
+
+**Automated Flow:**
+1. Push to `dev` → CI runs tests → on success, auto-bump patch (0.2.0 → 0.2.1)
+2. Create PR from `dev` to `main` → CI runs tests
+3. Merge PR → Release workflow:
+ - Tags current version (v0.2.5)
+ - Creates GitHub release with changelog
+ - Preps dev for next release (0.2.5 → 0.3.0)
---
diff --git a/client/package-lock.json b/client/package-lock.json
index cbf4471cc4..0ce9c07c89 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "portos-client",
- "version": "0.1.0",
+ "version": "0.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "portos-client",
- "version": "0.1.0",
+ "version": "0.2.0",
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
diff --git a/client/package.json b/client/package.json
index 9ee9eb8e1a..4fda16d4fe 100644
--- a/client/package.json
+++ b/client/package.json
@@ -1,6 +1,6 @@
{
"name": "portos-client",
- "version": "0.1.0",
+ "version": "0.2.0",
"private": true,
"type": "module",
"scripts": {
diff --git a/package-lock.json b/package-lock.json
index 8840e5032e..ad68cd30ac 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "portos",
- "version": "0.1.0",
+ "version": "0.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "portos",
- "version": "0.1.0",
+ "version": "0.2.0",
"devDependencies": {
"concurrently": "^8.2.2"
}
diff --git a/package.json b/package.json
index d163b166fe..f165944105 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "portos",
- "version": "0.1.0",
+ "version": "0.2.0",
"private": true,
"description": "Local dev machine App OS portal",
"type": "module",
diff --git a/server/package-lock.json b/server/package-lock.json
index 9ccc8c75f9..4e711993ec 100644
--- a/server/package-lock.json
+++ b/server/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "portos-server",
- "version": "0.1.0",
+ "version": "0.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "portos-server",
- "version": "0.1.0",
+ "version": "0.2.0",
"dependencies": {
"cors": "^2.8.5",
"express": "^4.21.2",
diff --git a/server/package.json b/server/package.json
index 8c4d0652bc..a07b732e68 100644
--- a/server/package.json
+++ b/server/package.json
@@ -1,6 +1,6 @@
{
"name": "portos-server",
- "version": "0.1.0",
+ "version": "0.2.0",
"private": true,
"type": "module",
"scripts": {