From 13dfbea4422d64eae0ceb3110d033f4610fd6dcf Mon Sep 17 00:00:00 2001 From: softmaxe <94467584+softmaxe@users.noreply.github.com> Date: Sat, 7 Nov 2026 14:17:00 +0800 Subject: [PATCH] ci: streamline releases and agent validation --- .github/workflows/release.yml | 77 +++++++++-------------------------- AGENTS.md | 11 +++++ 2 files changed, 31 insertions(+), 57 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e3dd00..ee8f961 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,12 +13,14 @@ env: TARGET: aarch64-apple-darwin jobs: - build: - name: Build aarch64-apple-darwin + release: + name: Build, publish, and test release runs-on: macos-26 - timeout-minutes: 30 + timeout-minutes: 40 permissions: - contents: read + contents: write + id-token: write + attestations: write outputs: version: ${{ steps.version.outputs.version }} steps: @@ -72,7 +74,7 @@ jobs: run: | set -euo pipefail package_dir="$RUNNER_TEMP/package-$TARGET" - dist_dir="$RUNNER_TEMP/dist-$TARGET" + dist_dir="$GITHUB_WORKSPACE/dist" mkdir -p "$package_dir" "$dist_dir" install -m 0755 build/ferry "$package_dir/ferry" install -m 0644 LICENSE "$package_dir/LICENSE" @@ -84,31 +86,6 @@ jobs: shasum -a 256 "$archive" > "$archive.sha256" ) - - name: Upload release files - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 - with: - name: release-${{ env.TARGET }} - path: ${{ runner.temp }}/dist-${{ env.TARGET }}/* - if-no-files-found: error - retention-days: 30 - - release: - name: Publish GitHub Release - needs: build - runs-on: ubuntu-24.04 - timeout-minutes: 15 - permissions: - contents: write - id-token: write - attestations: write - steps: - - name: Download release files - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 - with: - pattern: release-* - path: dist - merge-multiple: true - - name: Attest release archives uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 with: @@ -147,7 +124,7 @@ jobs: shell: bash env: TAG: ${{ github.ref_name }} - VERSION: ${{ needs.build.outputs.version }} + VERSION: ${{ steps.version.outputs.version }} run: | set -euo pipefail arm_archive="ferry-v$VERSION-$TARGET.tar.gz" @@ -183,28 +160,8 @@ jobs: ruby -c formula/ferry.rb - - name: Upload candidate formula - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 - with: - name: homebrew-formula - path: formula/ferry.rb - if-no-files-found: error - retention-days: 30 - - formula-test: - name: Test formula on arm64 - needs: release - runs-on: macos-26 - timeout-minutes: 25 - permissions: - contents: read - steps: - - name: Download candidate formula - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 - with: - name: homebrew-formula - path: formula - + # Reuse this runner to avoid a second macOS queue wait. The release must + # be public before Homebrew can validate its download URL. - name: Install and test formula shell: bash run: | @@ -221,11 +178,17 @@ jobs: brew install softmaxe/release-test/ferry brew test softmaxe/release-test/ferry + - name: Upload tested formula + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: homebrew-formula + path: formula/ferry.rb + if-no-files-found: error + retention-days: 30 + tap-sync: name: Update Homebrew tap - needs: - - build - - formula-test + needs: release runs-on: ubuntu-24.04 timeout-minutes: 10 permissions: @@ -255,7 +218,7 @@ jobs: - name: Commit and push formula shell: bash env: - VERSION: ${{ needs.build.outputs.version }} + VERSION: ${{ needs.release.outputs.version }} run: | set -euo pipefail cd homebrew-tap diff --git a/AGENTS.md b/AGENTS.md index 7d309c5..66952ee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,3 +7,14 @@ For feature changes, updates, and bug investigation or fixes: 2. Prefer reusing or adapting the upstream approach. 3. Write a custom implementation only when upstream cannot meet the requirements, and briefly explain why. + +# Validation and delivery + +- Before merging, read the current branch rules and wait for required checks on + the latest revision. Proceed once those checks and other merge requirements + pass; optional checks may finish asynchronously. Investigate known failures. +- For changes to window movement or Space focus, also run `make test-follow` on + a local desktop with Accessibility and two normal Spaces. If that environment + is unavailable, report the missing validation explicitly. +- Use PR CI for routine iteration. Create release tags only when a release is + requested; batch changes into a usable version.