From f4af79a1b890307a28d0d986a0c06dc92192c222 Mon Sep 17 00:00:00 2001 From: ocavue Date: Fri, 25 Oct 2024 15:47:53 +1100 Subject: [PATCH] ci: fix release workflow (#1241) --- .github/workflows/release-continuous.yml | 1 + .github/workflows/release.yml | 15 +++++++++------ package.json | 8 ++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-continuous.yml b/.github/workflows/release-continuous.yml index 541b223a0..300f7070c 100644 --- a/.github/workflows/release-continuous.yml +++ b/.github/workflows/release-continuous.yml @@ -10,6 +10,7 @@ jobs: uses: actions/checkout@v4 - run: corepack enable + - uses: actions/setup-node@v4 with: node-version: lts/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a67f92ab7..e9cdb685d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,20 +14,23 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set node - uses: actions/setup-node@v4 + - run: corepack enable + + - uses: actions/setup-node@v4 with: node-version: lts/* + cache: pnpm + + - name: Install dependencies + run: pnpm install - run: npx changelogithub env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Dependencies - run: pnpm i + - name: Build + run: pnpm build - name: Publish to NPM run: pnpm publish --access public --no-git-checks diff --git a/package.json b/package.json index 4b514feab..729e1d40b 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,13 @@ "tsup-node": "dist/cli-node.js" }, "scripts": { - "dev": "npm run build-fast -- --watch", + "dev": "pnpm run build-fast -- --watch", "build": "tsup src/cli-*.ts src/index.ts src/rollup.ts --clean --splitting", - "prepublishOnly": "npm run build", - "test": "npm run build && npm run test-only", + "prepublishOnly": "pnpm run build", + "test": "pnpm run build && pnpm run test-only", "format": "prettier --write .", "test-only": "vitest run", - "build-fast": "npm run build -- --no-dts", + "build-fast": "pnpm run build -- --no-dts", "release": "bumpp" }, "peerDependencies": {