release: v0.6.3 #17
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 | |
| id-token: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Rust tests | |
| run: cargo test | |
| - name: Install JS dependencies | |
| run: bun install | |
| - name: TypeScript typecheck | |
| run: bun run typecheck | |
| - name: Plugin tests | |
| run: bun run test | |
| - name: Lint | |
| run: bun run lint | |
| publish-crates: | |
| name: Publish to crates.io | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Publish to crates.io | |
| run: cargo publish --package agent-file-tools | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| build-darwin-arm64: | |
| name: Build macOS ARM64 | |
| runs-on: macos-latest | |
| needs: [test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin | |
| - name: Build | |
| run: cargo build --release --target aarch64-apple-darwin | |
| - name: Strip binary | |
| run: strip target/aarch64-apple-darwin/release/aft | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: darwin-arm64 | |
| path: target/aarch64-apple-darwin/release/aft | |
| if-no-files-found: error | |
| build-darwin-x64: | |
| name: Build macOS x64 | |
| runs-on: macos-latest | |
| needs: [test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-apple-darwin | |
| - name: Build | |
| run: cargo build --release --target x86_64-apple-darwin | |
| - name: Strip binary | |
| run: strip target/x86_64-apple-darwin/release/aft | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: darwin-x64 | |
| path: target/x86_64-apple-darwin/release/aft | |
| if-no-files-found: error | |
| build-linux-arm64: | |
| name: Build Linux ARM64 | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-unknown-linux-musl | |
| - name: Install cross | |
| run: cargo install cross --version 0.2.5 --locked | |
| - name: Build | |
| run: cross build --release --target aarch64-unknown-linux-musl | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-arm64 | |
| path: target/aarch64-unknown-linux-musl/release/aft | |
| if-no-files-found: error | |
| build-linux-x64: | |
| name: Build Linux x64 | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-unknown-linux-musl | |
| - name: Install cross | |
| run: cargo install cross --version 0.2.5 --locked | |
| - name: Build | |
| run: cross build --release --target x86_64-unknown-linux-musl | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-x64 | |
| path: target/x86_64-unknown-linux-musl/release/aft | |
| if-no-files-found: error | |
| build-win32-x64: | |
| name: Build Windows x64 | |
| runs-on: windows-latest | |
| needs: [test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-msvc | |
| - name: Build | |
| run: cargo build --release --target x86_64-pc-windows-msvc | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: win32-x64 | |
| path: target/x86_64-pc-windows-msvc/release/aft.exe | |
| if-no-files-found: error | |
| publish-npm: | |
| name: Publish to npm | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-darwin-arm64 | |
| - build-darwin-x64 | |
| - build-linux-arm64 | |
| - build-linux-x64 | |
| - build-win32-x64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Ensure latest npm (for trusted publishing) | |
| run: npm install -g npm@latest | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Download darwin-arm64 binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: darwin-arm64 | |
| path: packages/npm/darwin-arm64/bin | |
| - name: Download darwin-x64 binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: darwin-x64 | |
| path: packages/npm/darwin-x64/bin | |
| - name: Download linux-arm64 binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-arm64 | |
| path: packages/npm/linux-arm64/bin | |
| - name: Download linux-x64 binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-x64 | |
| path: packages/npm/linux-x64/bin | |
| - name: Download win32-x64 binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: win32-x64 | |
| path: packages/npm/win32-x64/bin | |
| - name: Set binary permissions | |
| run: | | |
| chmod +x packages/npm/darwin-arm64/bin/aft | |
| chmod +x packages/npm/darwin-x64/bin/aft | |
| chmod +x packages/npm/linux-arm64/bin/aft | |
| chmod +x packages/npm/linux-x64/bin/aft | |
| - name: Sync versions from tag | |
| run: node scripts/version-sync.mjs --from-tag | |
| - name: Validate packages | |
| run: node scripts/validate-packages.mjs | |
| - name: Install plugin dependencies | |
| run: bun install | |
| working-directory: packages/opencode-plugin | |
| - name: Build plugin | |
| run: bun run build | |
| working-directory: packages/opencode-plugin | |
| # Uses npm Trusted Publishing (OIDC) — configured per-package on npmjs.com | |
| - name: Publish platform packages | |
| run: | | |
| for pkg in darwin-arm64 darwin-x64 linux-arm64 linux-x64 win32-x64; do | |
| npm publish --access public --provenance "packages/npm/$pkg" | |
| done | |
| - name: Publish @cortexkit/aft-opencode | |
| run: npm publish --access public --provenance | |
| working-directory: packages/opencode-plugin | |
| github-release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-darwin-arm64 | |
| - build-darwin-x64 | |
| - build-linux-arm64 | |
| - build-linux-x64 | |
| - build-win32-x64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p release-assets | |
| cp artifacts/darwin-arm64/aft release-assets/aft-darwin-arm64 | |
| cp artifacts/darwin-x64/aft release-assets/aft-darwin-x64 | |
| cp artifacts/linux-arm64/aft release-assets/aft-linux-arm64 | |
| cp artifacts/linux-x64/aft release-assets/aft-linux-x64 | |
| cp artifacts/win32-x64/aft.exe release-assets/aft-win32-x64.exe | |
| chmod +x release-assets/aft-* | |
| - name: Generate checksums | |
| run: | | |
| cd release-assets | |
| shasum -a 256 aft-* > checksums.sha256 | |
| cat checksums.sha256 | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: release-assets/* |