diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9b6c85..bc55e84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,22 +8,4 @@ on: jobs: test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - - - name: Install dependencies - run: npm install - - - name: Type check - run: npm run typecheck - - - name: Run tests - run: npm run test:coverage + uses: contact-api/.github/.github/workflows/test.yml@v1.0.1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7fed609..9552f64 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,30 +6,10 @@ on: - 'v*' jobs: - publish: - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '24' - registry-url: 'https://registry.npmjs.org' + test: + uses: contact-api/.github/.github/workflows/test.yml@v1.0.1 - - name: Install dependencies - run: npm install - - - name: Publish to npm - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - generate_release_notes: true + publish: + needs: test + uses: contact-api/.github/.github/workflows/publish.yml@v1.0.1 + secrets: inherit diff --git a/README.md b/README.md index ed24068..a0ad054 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Contact API Resend Resend email provider for `@contact-api/core`. +[![CI](https://github.com/contact-api/resend/actions/workflows/ci.yml/badge.svg)](https://github.com/contact-api/resend/actions/workflows/ci.yml) +[![License: MIT](https://img.shields.io/badge/license-MIT-green)](./LICENSE) + ## Usage ```ts import { createResendProvider } from "@contact-api/resend";