diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index ff1f7b3..ebcf837 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -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}" \ @@ -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 }} @@ -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 }} @@ -77,5 +70,3 @@ jobs: --body "Update Homebrew formula for resend ${VERSION}" \ --base main \ --head "$BRANCH" - - gh pr merge "$BRANCH" --merge --auto diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 93df1bb..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: brew pr-pull - -on: - pull_request_target: - types: - - labeled - -jobs: - pr-pull: - if: contains(github.event.pull_request.labels.*.name, 'pr-pull') - runs-on: ubuntu-22.04 - permissions: - actions: read - checks: read - contents: write - issues: read - pull-requests: write - steps: - - name: Set up Homebrew - uses: Homebrew/actions/setup-homebrew@main - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up git - uses: Homebrew/actions/git-user-config@main - - - name: Pull bottles - env: - HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PULL_REQUEST: ${{ github.event.pull_request.number }} - run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" - - - name: Push commits - uses: Homebrew/actions/git-try-push@main - with: - branch: main - - - name: Delete branch - if: github.event.pull_request.head.repo.fork == false - env: - BRANCH: ${{ github.event.pull_request.head.ref }} - run: git push --delete origin "$BRANCH" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 491eb23..4a57a4d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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.*' diff --git a/Formula/resend.rb b/Formula/resend.rb index 23b47ab..3da14e4 100644 --- a/Formula/resend.rb +++ b/Formula/resend.rb @@ -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 diff --git a/Formula/resend.rb.tpl b/Formula/resend.rb.tpl index ea911c5..a9f8318 100644 --- a/Formula/resend.rb.tpl +++ b/Formula/resend.rb.tpl @@ -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