Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

fix: publish release artifacts and docker together

JerrettDavisa36f3e2d3e04
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index f7311cd47..b9c7645d0 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -1,6 +1,17 @@
name: Docker
on:
+ workflow_call:
+ inputs:
+ version:
+ description: "Version to stamp into the image contents and exact image tag"
+ required: false
+ type: string
+ enable_ref_tags:
+ description: "Whether to emit branch/PR ref tags"
+ required: false
+ default: true
+ type: boolean
workflow_dispatch:
inputs:
version:
@@ -48,7 +59,7 @@ jobs:
- name: Determine image version
id: version
env:
- MANUAL_VERSION: ${{ github.event.inputs.version }}
+ MANUAL_VERSION: ${{ inputs.version || github.event.inputs.version }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
version="${MANUAL_VERSION#v}"
@@ -87,8 +98,8 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
- type=ref,event=branch,suffix=${{ matrix.variant != '' && format('-{0}', matrix.variant) || '' }}
- type=ref,event=pr,suffix=${{ matrix.variant != '' && format('-{0}', matrix.variant) || '' }}
+ type=ref,event=branch,enable=${{ inputs.enable_ref_tags }},suffix=${{ matrix.variant != '' && format('-{0}', matrix.variant) || '' }}
+ type=ref,event=pr,enable=${{ inputs.enable_ref_tags }},suffix=${{ matrix.variant != '' && format('-{0}', matrix.variant) || '' }}
type=raw,value=${{ steps.version.outputs.version }},enable=${{ steps.version.outputs.version != '' }},suffix=${{ matrix.variant != '' && format('-{0}', matrix.variant) || '' }}
type=semver,pattern={{version}},suffix=${{ matrix.variant != '' && format('-{0}', matrix.variant) || '' }}
type=semver,pattern={{major}}.{{minor}},suffix=${{ matrix.variant != '' && format('-{0}', matrix.variant) || '' }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 768d2e6bd..c9f86e89b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -86,6 +86,11 @@ jobs:
with:
python-version: "3.12"
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: "20"
+
- name: Sync version to package files
run: |
python scripts/version-sync.py --version ${{ needs.detect-version.outputs.npm_version }}
@@ -130,12 +135,35 @@ jobs:
- name: Build Python package
run: python -m pip install build wheel && python -m build
+ - name: Build npm release packages
+ run: |
+ mkdir -p release-assets
+ cp dist/* release-assets/
+
+ cd sdk/typescript
+ npm install
+ npm run build
+ npm version ${{ needs.detect-version.outputs.npm_version }} --no-git-tag-version
+ npm pack --pack-destination ../../release-assets
+
+ cd ../../plugins/openclaw
+ npm install
+ npm run build
+ npm version ${{ needs.detect-version.outputs.npm_version }} --no-git-tag-version
+ npm pack --pack-destination ../../release-assets
+
- name: Upload dist artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
+ - name: Upload release assets artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: release-assets
+ path: release-assets/
+
publish-pypi:
needs: [build]
if: github.event.inputs.dry_run != 'true' && vars.PYPI_SKIP != 'true'
@@ -248,8 +276,21 @@ jobs:
run: |
echo "::notice::GitHub Package Registry publish failed. Check GITHUB_TOKEN permissions and registry configuration. Set GITHUB_PKG_SKIP=true to skip."
+ publish-docker:
+ needs: [detect-version]
+ if: github.event.inputs.dry_run != 'true'
+ permissions:
+ contents: read
+ packages: write
+ id-token: write
+ uses: ./.github/workflows/docker.yml
+ with:
+ version: ${{ needs.detect-version.outputs.version }}
+ enable_ref_tags: false
+
create-release:
- needs: [detect-version, build]
+ needs: [detect-version, build, publish-docker]
+ if: github.event.inputs.dry_run != 'true'
runs-on: ubuntu-latest
permissions:
contents: write
@@ -264,12 +305,22 @@ jobs:
name: changelog
path: /tmp
+ - name: Download release assets artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: release-assets
+ path: release-assets
+
- name: Show changelog
run: |
ls -la /tmp/changelog-backup.md
cp /tmp/changelog-backup.md .changelog.md
cat .changelog.md
+ - name: Show release assets
+ run: |
+ ls -la release-assets
+
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -281,3 +332,4 @@ jobs:
else
gh release create "$TAG" --title "$TITLE" --notes-file .changelog.md
fi
+ gh release upload "$TAG" release-assets/* --clobber
diff --git a/docs/content/docs/releases.mdx b/docs/content/docs/releases.mdx
index 6d43b8e3a..7b4b5cf64 100644
--- a/docs/content/docs/releases.mdx
+++ b/docs/content/docs/releases.mdx
@@ -5,9 +5,9 @@ description: Automated release pipeline with semantic versioning, multi-package
## Overview
-Headroom uses a unified GitHub Actions workflow (`.github/workflows/release.yml`) that automatically publishes all three packages, generates changelogs from conventional commits, and creates GitHub Releases.
+Headroom uses a unified GitHub Actions workflow (`.github/workflows/release.yml`) that automatically publishes all three packages, builds version-matched Docker images, generates changelogs from conventional commits, and creates GitHub Releases with package assets attached.
-Publishing a GitHub Release also triggers `.github/workflows/docker.yml`, which builds GHCR images tagged with the same semantic version and syncs the image contents to that exact release version before build.
+The release workflow also calls `.github/workflows/docker.yml` as a reusable workflow so GHCR images are published in the same release run with the exact same synced version as PyPI, npm, and GitHub release assets.
## Packages & Registries
@@ -96,8 +96,11 @@ Publishes both TypeScript packages to npmjs.org:
### publish-github-packages
Publishes `plugins/openclaw/` to GitHub Package Registry (`npm.pkg.github.com`).
+### publish-docker
+Calls the reusable Docker workflow to publish GHCR images with the same semantic version and synced package metadata as the rest of the release.
+
### create-release
-Creates a GitHub Release with the generated changelog as release notes, tagged as `v{canonical}.{height}`.
+Creates or updates the GitHub Release, uploads the built Python distributions and npm tarballs as release assets, and publishes the generated changelog as release notes.
## Configuration