chore: bump version #11
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: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| runs-on: blacksmith-2vcpu-ubuntu-2204 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build binaries | |
| run: | | |
| bun build --compile --minify --sourcemap --bytecode src/cli.ts --target=bun-darwin-arm64 --outfile dist/resend-darwin-arm64 | |
| bun build --compile --minify --sourcemap --bytecode src/cli.ts --target=bun-darwin-x64 --outfile dist/resend-darwin-x64 | |
| bun build --compile --minify --sourcemap --bytecode src/cli.ts --target=bun-linux-x64 --outfile dist/resend-linux-x64 | |
| bun build --compile --minify --sourcemap --bytecode src/cli.ts --target=bun-linux-arm64 --outfile dist/resend-linux-arm64 | |
| bun build --compile --minify --sourcemap --bytecode src/cli.ts --target=bun-windows-x64 --outfile dist/resend-windows-x64.exe | |
| - name: Verify binaries | |
| run: | | |
| for f in dist/resend-darwin-arm64 dist/resend-darwin-x64 \ | |
| dist/resend-linux-x64 dist/resend-linux-arm64 \ | |
| dist/resend-windows-x64.exe; do | |
| [ -s "$f" ] || { echo "Missing or empty: $f"; exit 1; } | |
| done | |
| - name: Package archives | |
| run: | | |
| cd dist | |
| for bin in resend-darwin-arm64 resend-darwin-x64 resend-linux-x64 resend-linux-arm64; do | |
| cp "$bin" resend | |
| chmod +x resend | |
| tar -czf "${bin}.tar.gz" resend | |
| rm resend | |
| done | |
| cp resend-windows-x64.exe resend.exe | |
| zip resend-windows-x64.zip resend.exe | |
| rm resend.exe | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| body: | | |
| ## Install | |
| **macOS / Linux** | |
| ```sh | |
| curl -fsSL https://resend.com/install.sh | bash | |
| ``` | |
| **Windows (PowerShell)** | |
| ```pwsh | |
| irm https://resend.com/install.ps1 | iex | |
| ``` | |
| **GitHub CLI** _(use while repo is private)_ | |
| ```sh | |
| gh release download --repo resend/resend-cli --pattern "resend-darwin-arm64.tar.gz" | |
| tar -xzf resend-darwin-arm64.tar.gz && sudo mv resend /usr/local/bin/ && rm resend-darwin-arm64.tar.gz | |
| ``` | |
| files: | | |
| dist/resend-darwin-arm64.tar.gz | |
| dist/resend-darwin-x64.tar.gz | |
| dist/resend-linux-x64.tar.gz | |
| dist/resend-linux-arm64.tar.gz | |
| dist/resend-windows-x64.zip | |
| notify-tap: | |
| name: Trigger Homebrew Tap Update | |
| needs: release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Dispatch publish-release workflow on tap | |
| env: | |
| GH_TOKEN: ${{ secrets.RELEASE_CLI_ON_HOMEBREW }} | |
| run: | | |
| gh workflow run publish-release.yml \ | |
| --repo resend/homebrew-cli \ | |
| --field version="${GITHUB_REF_NAME}" |