Skip to content

Add code signing and notarization to Bun Compile workflow#101

Merged
kjiang-ac merged 13 commits intomainfrom
auggie-bun-compile-workflow
Mar 11, 2026
Merged

Add code signing and notarization to Bun Compile workflow#101
kjiang-ac merged 13 commits intomainfrom
auggie-bun-compile-workflow

Conversation

@kjiang-ac
Copy link
Contributor

Adds macOS code signing (Developer ID Application) and Apple notarization steps to the Bun Compile workflow for darwin binaries.

This ensures downloaded auggie binaries pass codesign --verify --strict and are accepted by macOS Gatekeeper.


Pull Request opened by Augment Code with guidance from the PR author

kjiang-ac added 13 commits March 5, 2026 12:57
Adds .github/workflows/bun-compile.yml that compiles the Auggie CLI
into self-contained native binaries using Bun, pulling the pre-built
@augmentcode/auggie package from npm.

- workflow_dispatch trigger with required version input
- 4 platform targets via matrix (darwin-arm64, darwin-x64, linux-x64, windows-x64)
- Cross-compilation on ubuntu-latest using bun build --compile --target
- Release job creates GitHub Release with all 4 binaries attached
Agent-Id: agent-42aef0a6-de54-40e7-9889-e6dc52b9645d
Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
Addresses PR review comments: remove '0.18.1' fallback in both build
and release jobs. Version is now passed via env vars and the workflow
fails explicitly if no version is supplied via workflow_dispatch or
repository_dispatch.

Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
@kjiang-ac kjiang-ac merged commit 57b1beb into main Mar 11, 2026
1 of 5 checks passed
@kjiang-ac kjiang-ac deleted the auggie-bun-compile-workflow branch March 11, 2026 18:48
@augment-app-staging
Copy link

augment-app-staging bot commented Mar 11, 2026

🤖 Augment PR Summary

Summary: Adds a GitHub Actions workflow to build self-contained Auggie CLI binaries from the published @augmentcode/auggie npm package using Bun.

Changes:

  • Compiles darwin (arm64/x64), linux x64, and windows x64 targets via bun build --compile.
  • Adds macOS Developer ID code signing and Apple notarization for darwin artifacts.
  • Uploads per-platform artifacts, generates SHA-256 checksums, and publishes a versioned GitHub Release.

Technical Notes: The build/release version is provided via workflow_dispatch input or repository_dispatch payload.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augment-app-staging augment-app-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

type: string
repository_dispatch:
types: [npm-published]
push:
Copy link

@augment-app-staging augment-app-staging bot Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test position anchor

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link

@augment-app-staging augment-app-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Items Reviewed
  • ✅ Check review guidelines
  • ✅ Verify workflow triggers & version propagation
  • ✅ Verify macOS signing & notarization steps
  • ✅ Verify artifacts, checksums, and release creation
  • ✅ Review .github/workflows/bun-compile.yml

Comment augment review to trigger a new review at any time.

type: string
repository_dispatch:
types: [npm-published]
push:
Copy link

@augment-app-staging augment-app-staging bot Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since VERSION is only populated from workflow_dispatch/repository_dispatch, any run triggered by push will hit the “No version provided” error and fail. If push runs are expected, consider how VERSION should be sourced for them.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

contents: read
steps:
- name: Set up Bun
uses: oven-sh/setup-bun@v2
Copy link

@augment-app-staging augment-app-staging bot Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow handles signing/notarization secrets, but it references actions by movable tags (e.g., oven-sh/setup-bun@v2), which increases supply-chain risk if a tag is moved/compromised. Pinning actions to immutable commit SHAs would reduce that risk.

Severity: medium

Other Locations
  • .github/workflows/bun-compile.yml:101
  • .github/workflows/bun-compile.yml:113

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
zip "${{ matrix.output }}.zip" "${{ matrix.output }}"
xcrun notarytool submit "${{ matrix.output }}.zip" --apple-id "$APPLE_ID" --password "$APPLE_APP_SPECIFIC_PASSWORD" --team-id "$APPLE_TEAM_ID" --wait
Copy link

@augment-app-staging augment-app-staging bot Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow submits for notarization but doesn’t staple the ticket afterwards. Without stapling, some users may still see Gatekeeper prompts/errors when running the downloaded binary offline.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link

@augment-app-staging augment-app-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

This looks solid overall — the signing/notarization steps follow standard Apple practices. A few observations:

  1. Missing xcrun stapler — After notarization, you should staple the ticket to the binary:

    xcrun stapler staple "${{ matrix.output }}"
    

    Without this, the binary still passes Gatekeeper (Apple checks online), but stapling embeds the ticket so it works offline too. This is standard practice.

  2. Keychain cleanup — The temporary build.keychain is never deleted. Not a security risk on ephemeral GH runners, but adding security delete-keychain build.keychain in a post-step would be good hygiene.

  3. sha256sum on macOS — The checksum step runs in the release job on ubuntu-latest so this is fine today, but worth noting that macOS uses shasum -a 256 if the job runner ever changes.

  4. Merge conflicts — The PR is currently in a dirty mergeable state and needs a rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant