v1.0.24 #1
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: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| update-homebrew: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract version from tag | |
| run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV | |
| - name: Download DMG from release | |
| run: | | |
| curl -L \ | |
| "https://github.com/wxtsky/CodeIsland/releases/download/v${VERSION}/CodeIsland.dmg" \ | |
| -o CodeIsland.dmg | |
| - name: Compute SHA256 | |
| run: echo "SHA256=$(sha256sum CodeIsland.dmg | awk '{print $1}')" >> $GITHUB_ENV | |
| - name: Clone homebrew-tap | |
| run: | | |
| git clone "https://x-access-token:${{ secrets.HOMEBREW_TAP_TOKEN }}@github.com/wxtsky/homebrew-tap.git" homebrew-tap | |
| - name: Update Cask formula | |
| run: | | |
| mkdir -p homebrew-tap/Casks | |
| cat > homebrew-tap/Casks/codeisland.rb <<'CASK_EOF' | |
| cask "codeisland" do | |
| version "VERSION_PLACEHOLDER" | |
| sha256 "SHA256_PLACEHOLDER" | |
| url "https://github.com/wxtsky/CodeIsland/releases/download/v#{version}/CodeIsland.dmg" | |
| name "CodeIsland" | |
| desc "Menu bar companion for Claude Code, Codex, Gemini CLI and more" | |
| homepage "https://github.com/wxtsky/CodeIsland" | |
| app "CodeIsland.app" | |
| zap trash: [ | |
| "~/.codeisland", | |
| ] | |
| end | |
| CASK_EOF | |
| sed -i "s/VERSION_PLACEHOLDER/${VERSION}/" homebrew-tap/Casks/codeisland.rb | |
| sed -i "s/SHA256_PLACEHOLDER/${SHA256}/" homebrew-tap/Casks/codeisland.rb | |
| sed -i 's/^ //' homebrew-tap/Casks/codeisland.rb | |
| - name: Commit and push to homebrew-tap | |
| run: | | |
| cd homebrew-tap | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Casks/codeisland.rb | |
| git commit -m "Update codeisland to ${VERSION}" | |
| git push |