From d055d89bf1ddbf2c927255070050875b2c746528 Mon Sep 17 00:00:00 2001 From: jarvisjiang Date: Mon, 13 May 2024 12:47:56 +0000 Subject: [PATCH] update actions --- .github/workflows/jsr-publish.yml | 23 +++++++++++++++++++ .../workflows/npm-publish-github-packages.yml | 16 +++++++++---- .github/workflows/npm-publish.yml | 16 +++++++++---- .github/workflows/test.yml | 11 ++++++++- 4 files changed, 57 insertions(+), 9 deletions(-) diff --git a/.github/workflows/jsr-publish.yml b/.github/workflows/jsr-publish.yml index 3d39eca..95014aa 100644 --- a/.github/workflows/jsr-publish.yml +++ b/.github/workflows/jsr-publish.yml @@ -7,7 +7,30 @@ on: - main jobs: + install: + runs-on: ubuntu-latest + + steps: + - uses: pnpm/action-setup@v4 + with: + version: 8 + + test: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - run: pnpm install + - run: npm test + publish-jsr: + needs: test runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index c397264..0258c8d 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -8,7 +8,16 @@ on: types: [created] jobs: - build: + install: + runs-on: ubuntu-latest + + steps: + - uses: pnpm/action-setup@v4 + with: + version: 8 + + test: + needs: install runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,11 +27,11 @@ jobs: - uses: oven-sh/setup-bun@v1 with: bun-version: latest - - run: npm ci + - run: pnpm install - run: npm test publish-gpr: - needs: build + needs: test runs-on: ubuntu-latest permissions: contents: read @@ -33,7 +42,6 @@ jobs: with: node-version: 20 registry-url: https://npm.pkg.github.com/ - - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 33432ad..18f88d9 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,7 +8,16 @@ on: types: [created] jobs: - build: + install: + runs-on: ubuntu-latest + + steps: + - uses: pnpm/action-setup@v4 + with: + version: 8 + + test: + needs: install runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,11 +27,11 @@ jobs: - uses: oven-sh/setup-bun@v1 with: bun-version: latest - - run: npm ci + - run: pnpm install - run: npm test publish-npm: - needs: build + needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -30,7 +39,6 @@ jobs: with: node-version: 20 registry-url: https://registry.npmjs.org/ - - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4355574..963c115 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,16 @@ on: - main jobs: + install: + runs-on: ubuntu-latest + + steps: + - uses: pnpm/action-setup@v4 + with: + version: 8 + test: + needs: install runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,7 +27,7 @@ jobs: - uses: oven-sh/setup-bun@v1 with: bun-version: latest - - run: npm ci + - run: pnpm install - run: npm test - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4