From ca35e29fee224b97875b9c77f23cd89490cefb89 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 16 Dec 2024 09:04:00 -0800 Subject: [PATCH] ci: split out into steps --- .github/workflows/ci.yml | 9 +++++---- .github/workflows/release.yml | 15 ++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c29b5e0..5b2d43b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,10 +10,11 @@ jobs: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 - - name: Run unit tests - run: | - bun install - bun prepack + - name: Install dependencies + run: bun install + + - name: Build package + run: bun run prepack - name: Trigger deploy if: github.ref == 'refs/heads/master' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91f0f3b..329613f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,13 +16,14 @@ jobs: with: node-version: "20.x" registry-url: "https://registry.npmjs.org" + + - name: Install dependencies + run: bun install + + - name: Build package + run: bun run prepack + - name: Publish package env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - # Currently, only npm supports publishing packages with provenance - # https://docs.npmjs.com/generating-provenance-statements - run: | - bun install - bun prepack - npm publish --provenance --access public + run: npm publish --provenance --access public