feat: rebrand run_plan as "Operator" — Pro Tier Killer Feature #2
Workflow file for this run
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
| name: Release | |
| on: | |
| push: | |
| tags: ['v*'] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-release: | |
| name: Build & Release | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout public repo | |
| uses: actions/checkout@v4 | |
| - name: Checkout Pro repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Silbercue/SilbercueSwiftPro | |
| path: SilbercueSwiftPro | |
| ssh-key: ${{ secrets.PRO_DEPLOY_KEY }} | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_16.2.app | |
| - name: Build combined binary | |
| run: ./SilbercueSwiftMCP/scripts/build-combined.sh ./SilbercueSwiftPro | |
| - name: Prepare release assets | |
| id: assets | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| BINARY="SilbercueSwiftMCP/.build/release/SilbercueSwift" | |
| # Ad-hoc code sign | |
| codesign -s - "$BINARY" | |
| # Staging: Binary + WDA source nebeneinander | |
| STAGING="release-staging" | |
| mkdir -p "$STAGING/SilbercueWDA" | |
| cp "$BINARY" "$STAGING/" | |
| cp -R SilbercueWDA/SilbercueWDA.xcodeproj "$STAGING/SilbercueWDA/" | |
| cp -R SilbercueWDA/SilbercueWDARunner "$STAGING/SilbercueWDA/" | |
| cp -R SilbercueWDA/Sources "$STAGING/SilbercueWDA/" | |
| cp SilbercueWDA/project.yml "$STAGING/SilbercueWDA/" 2>/dev/null || true | |
| # Create tarball | |
| TARBALL="silbercueswift-${TAG_NAME}-macos-arm64.tar.gz" | |
| tar -czf "$TARBALL" -C "$STAGING" SilbercueSwift SilbercueWDA | |
| # Compute SHA256 | |
| SHA=$(shasum -a 256 "$TARBALL" | cut -d' ' -f1) | |
| echo "tarball=$TARBALL" >> "$GITHUB_OUTPUT" | |
| echo "sha256=$SHA" >> "$GITHUB_OUTPUT" | |
| - name: Validate tarball contents | |
| env: | |
| TARBALL: ${{ steps.assets.outputs.tarball }} | |
| run: | | |
| tar -tzf "$TARBALL" | grep -q "SilbercueWDA/SilbercueWDA.xcodeproj/project.pbxproj" | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG_NAME: ${{ github.ref_name }} | |
| TARBALL: ${{ steps.assets.outputs.tarball }} | |
| run: | | |
| gh release create "$TAG_NAME" "$TARBALL" \ | |
| --title "SilbercueSwift $TAG_NAME" \ | |
| --generate-notes | |
| - name: Update Homebrew formula | |
| env: | |
| GH_TOKEN: ${{ secrets.HOMEBREW_TOKEN }} | |
| TAG_NAME: ${{ github.ref_name }} | |
| SHA: ${{ steps.assets.outputs.sha256 }} | |
| run: | | |
| SEMVER="${TAG_NAME#v}" | |
| git clone "https://x-access-token:${GH_TOKEN}@github.com/Silbercue/homebrew-silbercue.git" /tmp/homebrew-tap | |
| cd /tmp/homebrew-tap | |
| sed -i '' "s|version \".*\"|version \"${SEMVER}\"|" Formula/silbercueswift.rb | |
| sed -i '' "s|releases/download/v[^/]*/silbercueswift-v[^\"]*|releases/download/${TAG_NAME}/silbercueswift-${TAG_NAME}-macos-arm64.tar.gz|" Formula/silbercueswift.rb | |
| sed -i '' "s|sha256 \".*\"|sha256 \"${SHA}\"|" Formula/silbercueswift.rb | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Formula/silbercueswift.rb | |
| git commit -m "chore: update formula to ${TAG_NAME}" | |
| git push |