From b52f9b93883382196f7e8fbec38dd5c618f742d2 Mon Sep 17 00:00:00 2001 From: Stephen Zhou Date: Mon, 13 May 2024 00:03:09 +0800 Subject: [PATCH] ci: simplify upload release action (#757) * ci: simplify upload release * knip --- .github/workflows/release-upload.yml | 45 ---------------------------- .release-it.json | 3 +- knip.json | 1 + 3 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/release-upload.yml diff --git a/.github/workflows/release-upload.yml b/.github/workflows/release-upload.yml deleted file mode 100644 index 5785cfa93..000000000 --- a/.github/workflows/release-upload.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Upload extension zip on release - -on: - release: - types: [published] - -permissions: - contents: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set node lts/* - uses: actions/setup-node@v4 - with: - node-version: lts/* - - - name: Install pnpm - uses: pnpm/action-setup@v3 - with: - run_install: | - - args: [--frozen-lockfile] - - - name: Build - run: | - pnpm build - pnpm build-firefox - - - name: Build Extension - run: | - pnpm pack:zip - pnpm pack:zip-firefox - - - name: Upload assets to a Release - uses: meeDamian/github-release@v2.0.3 - with: - files: | - extension.zip - extension-firefox.zip - token: ${{ secrets.GITHUB_TOKEN }} - allow_override: true - gzip: false diff --git a/.release-it.json b/.release-it.json index 136501564..d0bc7d771 100644 --- a/.release-it.json +++ b/.release-it.json @@ -19,6 +19,7 @@ "pnpm run lint", "pnpm run typecheck", "pnpm run test --run" - ] + ], + "after:release": "gh release upload v${version} extension.zip extension-firefox.zip" } } diff --git a/knip.json b/knip.json index f75d571dc..d07ff8483 100644 --- a/knip.json +++ b/knip.json @@ -11,6 +11,7 @@ "ignoreDependencies": [ "@iconify/json", "uno.css", "lint-staged" ], + "ignoreBinaries": ["gh"], "rules": { "types": "off", "enumMembers": "off",