From 8204013650d8d149a5b1e22c313cc26bf14978db Mon Sep 17 00:00:00 2001 From: LiaoLiao Date: Sat, 21 Sep 2024 21:24:56 +0800 Subject: [PATCH] ci: refactor publish workflow --- .github/workflows/publish.yaml | 25 +++++++++++++++++++++++++ .github/workflows/release.yaml | 22 ---------------------- 2 files changed, 25 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/publish.yaml delete mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..7bb82501 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,25 @@ +name: Publish +on: workflow_dispatch +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + check-latest: true + architecture: x64 + registry-url: 'https://registry.npmjs.org' + - run: pnpm install --frozen-lockfile + - run: pnpm -r lint + - run: pnpm -r build + # - run: pnpm -r publish + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 3397a29a..00000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: release -on: workflow_dispatch -jobs: - release: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 - with: - version: latest - - uses: actions/setup-node@v3 - with: - node-version: 16 - check-latest: true - architecture: x64 - registry-url: 'https://registry.npmjs.org' - - run: pnpm install --frozen-lockfile - - run: pnpm -r lint - - run: pnpm -r build - - run: pnpm -r publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}