-
Notifications
You must be signed in to change notification settings - Fork 14
ci: publish Sprout Agent Bundle (sprout-acp + sprout-agent + sprout-dev-mcp) to GitHub Releases #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+438
−97
Merged
ci: publish Sprout Agent Bundle (sprout-acp + sprout-agent + sprout-dev-mcp) to GitHub Releases #603
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
4dc22c7
ci: publish Sprout Agent Bundle (sprout-acp + sprout-agent + sprout-d…
tlongwell-block 866739b
ci(sprout-agent-bundle): address review — force-move rolling tag, sta…
tlongwell-block 59a28d0
ci(sprout-agent-bundle): pin action comments to exact tags (zizmor hy…
tlongwell-block File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,198 @@ | ||
| name: Sprout Agent Bundle | ||
|
|
||
| # Builds and publishes the Sprout Agent Bundle — a Linux tarball containing | ||
| # the three binaries an external service (e.g. sprout-backend-blox) needs to | ||
| # run a Sprout agent end-to-end: | ||
| # | ||
| # sprout-acp ACP harness that bridges Sprout events to the LLM agent | ||
| # sprout-agent ACP-compliant agent (spawns MCP, calls LLMs) | ||
| # sprout-dev-mcp Developer MCP server (multicall: rg, tree, sprout, | ||
| # git-credential-nostr, git-sign-nostr) | ||
| # | ||
| # Targets: x86_64-unknown-linux-musl and aarch64-unknown-linux-musl (static | ||
| # musl so the tarball runs on any modern Linux without libc surprises). | ||
| # | ||
| # Triggers: | ||
| # - push to main → updates rolling `sprout-agent-bundle-latest` release | ||
| # - tag `sprout-agent-bundle-v*` → versioned release | ||
| # - workflow_dispatch → manual canary build (no release publish) | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| tags: ["sprout-agent-bundle-v*"] | ||
| workflow_dispatch: | ||
| inputs: | ||
| publish: | ||
| description: "Publish to the rolling release (otherwise artifacts only)" | ||
| type: boolean | ||
| default: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build (${{ matrix.target }}) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| permissions: | ||
| contents: read | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| target: | ||
| - x86_64-unknown-linux-musl | ||
| - aarch64-unknown-linux-musl | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1 | ||
|
|
||
| - name: Install cross | ||
| uses: taiki-e/install-action@055f5df8c3f65ea01cd41e9dc855becd88953486 # v2 | ||
Check warningCode scanning / zizmor detects commit SHAs that don't match their version comment tags Warning
detects commit SHAs that don't match their version comment tags
|
||
| with: | ||
| tool: cross@0.2.5 | ||
|
|
||
| - name: Resolve version | ||
| id: ver | ||
| run: | | ||
| set -euo pipefail | ||
| WORKSPACE_VERSION=$(cargo metadata --no-deps --format-version=1 \ | ||
| | jq -r '.workspace_default_members[0] as $m | .packages[] | select(.id==$m) | .version') | ||
| if [[ -z "$WORKSPACE_VERSION" || "$WORKSPACE_VERSION" == "null" ]]; then | ||
| # Fallback: read sprout-acp's version directly. | ||
| WORKSPACE_VERSION=$(cargo metadata --no-deps --format-version=1 \ | ||
| | jq -r '.packages[] | select(.name=="sprout-acp") | .version') | ||
| fi | ||
|
|
||
| REF="${GITHUB_REF#refs/tags/}" | ||
| if [[ "$GITHUB_REF" == refs/tags/sprout-agent-bundle-v* ]]; then | ||
| VERSION="${REF#sprout-agent-bundle-v}" | ||
| CHANNEL="tag" | ||
| else | ||
| SHORT_SHA="${GITHUB_SHA::7}" | ||
| VERSION="${WORKSPACE_VERSION}+git.${SHORT_SHA}" | ||
| CHANNEL="rolling" | ||
| fi | ||
| { | ||
| echo "workspace_version=$WORKSPACE_VERSION" | ||
| echo "version=$VERSION" | ||
| echo "channel=$CHANNEL" | ||
| } >> "$GITHUB_OUTPUT" | ||
| echo "Resolved version=$VERSION channel=$CHANNEL" | ||
|
|
||
| - name: Build binaries | ||
| env: | ||
| TARGET: ${{ matrix.target }} | ||
| run: | | ||
| cross build --release --target "$TARGET" \ | ||
| -p sprout-acp \ | ||
| -p sprout-agent \ | ||
| -p sprout-dev-mcp | ||
|
|
||
| - name: Package bundle | ||
| id: pkg | ||
| env: | ||
| TARGET: ${{ matrix.target }} | ||
| VERSION: ${{ steps.ver.outputs.version }} | ||
| GIT_SHA: ${{ github.sha }} | ||
| run: | | ||
| set -euo pipefail | ||
| ./scripts/build-agent-bundle.sh "$VERSION" "$TARGET" | ||
| # Capture the produced archive path for the upload step. | ||
| ARCHIVE="dist/sprout-agent-bundle-${VERSION}-${TARGET}.tar.gz" | ||
| test -f "$ARCHIVE" | ||
| echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT" | ||
| echo "archive_name=$(basename "$ARCHIVE")" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Upload workflow artifact | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| with: | ||
| name: sprout-agent-bundle-${{ matrix.target }} | ||
| path: | | ||
| ${{ steps.pkg.outputs.archive }} | ||
| ${{ steps.pkg.outputs.archive }}.sha256 | ||
| if-no-files-found: error | ||
| retention-days: 30 | ||
|
|
||
| publish: | ||
| name: Publish rolling release | ||
| needs: build | ||
| if: | | ||
| github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
| || (github.event_name == 'workflow_dispatch' && inputs.publish) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Download all bundle artifacts | ||
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | ||
| with: | ||
| path: dist | ||
| pattern: sprout-agent-bundle-* | ||
| merge-multiple: true | ||
|
|
||
| - name: List assets | ||
| run: ls -lh dist/ | ||
|
|
||
| - name: Update rolling release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| TAG="sprout-agent-bundle-latest" | ||
| TITLE="Sprout Agent Bundle (rolling)" | ||
| NOTES="Rolling Linux build of the Sprout Agent Bundle (sprout-acp + sprout-agent + sprout-dev-mcp), tracking \`main\` (\`${GITHUB_SHA}\`)." | ||
|
|
||
| # Create the release if it doesn't exist; otherwise reuse it. | ||
| if ! gh release view "$TAG" >/dev/null 2>&1; then | ||
| gh release create "$TAG" \ | ||
| --prerelease \ | ||
| --title "$TITLE" \ | ||
| --notes "$NOTES" | ||
| else | ||
| gh release edit "$TAG" --prerelease --title "$TITLE" --notes "$NOTES" | ||
| fi | ||
| gh release upload "$TAG" dist/* --clobber | ||
|
|
||
| publish-tag: | ||
| name: Publish tagged release | ||
| needs: build | ||
| if: startsWith(github.ref, 'refs/tags/sprout-agent-bundle-v') | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Download all bundle artifacts | ||
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | ||
| with: | ||
| path: dist | ||
| pattern: sprout-agent-bundle-* | ||
| merge-multiple: true | ||
|
|
||
| - name: Resolve tag version | ||
| id: ver | ||
| run: | | ||
| REF="${GITHUB_REF#refs/tags/}" | ||
| VERSION="${REF#sprout-agent-bundle-v}" | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| echo "tag=$REF" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Create tagged release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| TAG: ${{ steps.ver.outputs.tag }} | ||
| VERSION: ${{ steps.ver.outputs.version }} | ||
| run: | | ||
| set -euo pipefail | ||
| gh release create "$TAG" \ | ||
| --title "Sprout Agent Bundle v${VERSION}" \ | ||
| --notes "Sprout Agent Bundle v${VERSION} — Linux builds of sprout-acp + sprout-agent + sprout-dev-mcp." \ | ||
| dist/* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| # Build artifacts | ||
| /target/ | ||
| /dist/ | ||
|
|
||
| # Environment files (may contain secrets) | ||
| .env | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.