Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4

- name: Download binaries from resend-cli
env:
GH_TOKEN: ${{ secrets.RESEND_CLI_READONLY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ inputs.version }}
run: |
gh release download "${VERSION}" \
Expand All @@ -29,16 +30,6 @@ jobs:
--pattern "resend-linux-x64.tar.gz" \
--dir ./artifacts

- name: Create public release on tap repo
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ inputs.version }}
run: |
gh release create "${VERSION}" artifacts/*.tar.gz \
--repo resend/homebrew-cli \
--title "resend ${VERSION}" \
--notes "Resend CLI ${VERSION}"

- name: Compute SHA256 and update formula
env:
VERSION: ${{ inputs.version }}
Expand All @@ -57,7 +48,9 @@ jobs:
-e "s/{{SHA_LINUX_X64}}/${SHA_LINUX_X64}/" \
Formula/resend.rb.tpl > Formula/resend.rb

- name: Commit and push updated formula
rm -rf ./artifacts

- name: Create PR with updated formula
env:
VERSION: ${{ inputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -77,5 +70,3 @@ jobs:
--body "Update Homebrew formula for resend ${VERSION}" \
--base main \
--head "$BRANCH"

gh pr merge "$BRANCH" --merge --auto
42 changes: 0 additions & 42 deletions .github/workflows/publish.yml

This file was deleted.

29 changes: 1 addition & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,13 @@ on:

jobs:
test-bot:
strategy:
matrix:
os: [ ubuntu-22.04, macos-15-intel, macos-26 ]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
permissions:
actions: read
checks: read
contents: read
pull-requests: read
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Cache Homebrew Bundler RubyGems
uses: actions/cache@v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ matrix.os }}-rubygems-

- run: brew test-bot --only-cleanup-before

- run: brew test-bot --only-setup

- run: brew test-bot --only-tap-syntax
- run: brew test-bot --only-formulae
if: github.event_name == 'pull_request'

- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: bottles_${{ matrix.os }}
path: '*.bottle.*'
18 changes: 9 additions & 9 deletions Formula/resend.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
class Resend < Formula
desc "Command-line interface for Resend"
homepage "https://resend.com/cli"
version "1.1.0"
version "1.2.1"

on_macos do
if Hardware::CPU.arm?
url "https://github.com/resend/homebrew-cli/releases/download/v1.1.0/resend-darwin-arm64.tar.gz"
sha256 "20f750c2f9eed8f3a1f907588387cfcf05ccacd4136408d52f6e3c0f22d3d642"
url "https://github.com/resend/resend-cli/releases/download/v1.2.1/resend-darwin-arm64.tar.gz"
sha256 "7fa5c2a1b64c49149b0d31b6004f58509621afce5fc5d3203d7d8f178e4c9c95"
else
url "https://github.com/resend/homebrew-cli/releases/download/v1.1.0/resend-darwin-x64.tar.gz"
sha256 "0da5582fdb1ffffb39c7f7176d3ff5151921373e022ca1e7ca243e07f4adb596"
url "https://github.com/resend/resend-cli/releases/download/v1.2.1/resend-darwin-x64.tar.gz"
sha256 "07438cfc0e4515bcc9fe3f37151e839960757e6c219f7ad9bd16c7b7b9b6f204"
end
end

on_linux do
if Hardware::CPU.arm?
url "https://github.com/resend/homebrew-cli/releases/download/v1.1.0/resend-linux-arm64.tar.gz"
sha256 "1285e3204474a8d5ded096f5128a71e907c983531b2a003b8de9efe3a64295df"
url "https://github.com/resend/resend-cli/releases/download/v1.2.1/resend-linux-arm64.tar.gz"
sha256 "24071469255da883eb7a9332ea95697fd2eae65605b0529bd915b71d2429a779"
else
url "https://github.com/resend/homebrew-cli/releases/download/v1.1.0/resend-linux-x64.tar.gz"
sha256 "e76ea8ed869ef82f3dfef1d1f08c1dee421640b66b8e61815c6cd17bc512616e"
url "https://github.com/resend/resend-cli/releases/download/v1.2.1/resend-linux-x64.tar.gz"
sha256 "4533b94c44b3311433769ebac1c32461238ec9949c62aa45850c6bf527530968"
end
end

Expand Down
8 changes: 4 additions & 4 deletions Formula/resend.rb.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ class Resend < Formula

on_macos do
if Hardware::CPU.arm?
url "https://github.com/resend/homebrew-cli/releases/download/v{{VER}}/resend-darwin-arm64.tar.gz"
url "https://github.com/resend/resend-cli/releases/download/v{{VER}}/resend-darwin-arm64.tar.gz"
sha256 "{{SHA_DARWIN_ARM64}}"
else
url "https://github.com/resend/homebrew-cli/releases/download/v{{VER}}/resend-darwin-x64.tar.gz"
url "https://github.com/resend/resend-cli/releases/download/v{{VER}}/resend-darwin-x64.tar.gz"
sha256 "{{SHA_DARWIN_X64}}"
end
end

on_linux do
if Hardware::CPU.arm?
url "https://github.com/resend/homebrew-cli/releases/download/v{{VER}}/resend-linux-arm64.tar.gz"
url "https://github.com/resend/resend-cli/releases/download/v{{VER}}/resend-linux-arm64.tar.gz"
sha256 "{{SHA_LINUX_ARM64}}"
else
url "https://github.com/resend/homebrew-cli/releases/download/v{{VER}}/resend-linux-x64.tar.gz"
url "https://github.com/resend/resend-cli/releases/download/v{{VER}}/resend-linux-x64.tar.gz"
sha256 "{{SHA_LINUX_X64}}"
end
end
Expand Down
Loading