diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16ca646..bc55e84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,25 +5,7 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] - + 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