From 088f5ae68f1db1b60a63d0a19f70073aabe1cc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=80=E4=B9=8B?= Date: Thu, 10 Apr 2025 11:44:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0pnpm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 2 ++ .github/workflows/packageRelease.yml | 48 +++------------------------- .github/workflows/test.yaml | 2 ++ 3 files changed, 8 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 857d3cf..3cfcb73 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,6 +13,8 @@ jobs: name: Build steps: - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - name: Use Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/packageRelease.yml b/.github/workflows/packageRelease.yml index fa46335..8a52fad 100644 --- a/.github/workflows/packageRelease.yml +++ b/.github/workflows/packageRelease.yml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - name: Use Node.js uses: actions/setup-node@v4 with: @@ -28,48 +30,6 @@ jobs: pnpm i pnpm run pack - - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + - uses: ncipollo/release-action@v1 with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - body: | - 'no description' - draft: false - prerelease: false - - - name: Upload Release Asset zip - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/scriptcat-${{ github.ref_name }}-chrome.zip - asset_name: scriptcat-${{ github.ref_name }}-chrome.zip - asset_content_type: application/zip - - - name: Upload FireFox Release Asset zip - id: upload-firefox-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/scriptcat-${{ github.ref_name }}-firefox.zip - asset_name: scriptcat-${{ github.ref_name }}-firefox.zip - asset_content_type: application/zip - - - name: Upload Crx Release Asset zip - id: upload-crx-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/scriptcat-${{ github.ref_name }}-chrome.crx - asset_name: scriptcat-${{ github.ref_name }}-chrome.crx - asset_content_type: application/zip \ No newline at end of file + artifacts: "./dist/*.zip,./dist/*.crx" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b3308a9..f85ab6e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,6 +15,8 @@ jobs: name: Run tests steps: - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - name: Use Node.js uses: actions/setup-node@v4 with: