v0.8.3 #19
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: Build & Release | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Select Xcode 16 | |
| run: | | |
| XCODE_PATH=$(ls -d /Applications/Xcode_16* 2>/dev/null | sort -V | tail -1) | |
| echo "Using: $XCODE_PATH" | |
| sudo xcode-select -s "$XCODE_PATH" | |
| xcodebuild -version | |
| - name: Install XcodeGen | |
| run: brew install xcodegen | |
| # GhosttyKit.xcframework is gitignored — download it here. | |
| # Set GHOSTTYKIT_URL as a repo secret pointing to a .tar.gz of the framework. | |
| - name: Fetch GhosttyKit | |
| env: | |
| GHOSTTYKIT_URL: ${{ secrets.GHOSTTYKIT_URL }} | |
| run: | | |
| mkdir -p Frameworks | |
| curl -L -o ghosttykit.tar.gz "$GHOSTTYKIT_URL" | |
| tar -xzf ghosttykit.tar.gz -C Frameworks/ | |
| rm ghosttykit.tar.gz | |
| - name: Fetch CEF | |
| run: | | |
| CEF_ARCHIVE="cef_binary_144.0.6+g5f7e671+chromium-144.0.7559.59_macosarm64.tar.bz2" | |
| CEF_URL="https://cef-builds.spotifycdn.com/cef_binary_144.0.6%2Bg5f7e671%2Bchromium-144.0.7559.59_macosarm64.tar.bz2" | |
| mkdir -p ThirdParty/CEF | |
| curl -L -o "$CEF_ARCHIVE" "$CEF_URL" | |
| tar -xjf "$CEF_ARCHIVE" -C ThirdParty/CEF/ | |
| rm "$CEF_ARCHIVE" | |
| - name: Generate Xcode project | |
| run: xcodegen generate | |
| - name: Build DMG | |
| run: ./scripts/build-dmg.sh | |
| - name: Upload DMG to release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: Blink.dmg | |
| - name: Update Homebrew tap | |
| env: | |
| HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| SHA256=$(shasum -a 256 Blink.dmg | awk '{print $1}') | |
| echo "Updating tap to version $VERSION (sha256: $SHA256)" | |
| git clone "https://x-access-token:${HOMEBREW_TAP_TOKEN}@github.com/bradjenn/homebrew-tap.git" /tmp/homebrew-tap | |
| cd /tmp/homebrew-tap | |
| sed -i '' "s/version \".*\"/version \"$VERSION\"/" Casks/blink.rb | |
| sed -i '' "s/sha256 \".*\"/sha256 \"$SHA256\"/" Casks/blink.rb | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Casks/blink.rb | |
| git commit -m "Update blink to v$VERSION" | |
| git push |