From 71f49de56ec44bbdd263dbf747cf647fcf448810 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 | 12 ++++++------ .github/workflows/release.yml | 15 ++++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c29b5e0..af3585b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,14 +10,14 @@ 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' env: deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} - run: | - curl "$deploy_url" + run: curl "$deploy_url" 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