From a0ccb75762baa0b8d4ebba81494a791195a8bce7 Mon Sep 17 00:00:00 2001 From: molvqingtai Date: Fri, 27 Sep 2024 15:58:58 +0800 Subject: [PATCH] ci: configure workflows --- .github/workflows/cd.yml | 37 +++++++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..e5e563e --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,37 @@ +name: CD + +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: lts/* + - uses: pnpm/action-setup@v2.1.0 + with: + version: latest + - run: pnpm install --ignore-scripts + - run: pnpm run lint + - run: pnpm run tsc + + release: + needs: linter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: lts/* + - uses: pnpm/action-setup@v2.1.0 + with: + version: latest + - run: pnpm install --ignore-scripts + - run: pnpm zip diff --git a/package.json b/package.json index 6318b71..4106785 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "clear": "rimraf .output", "tsc:check": "tsc --noEmit", "prepare": "husky", - "postinstall": "wxt prepare" + "postinstall": "wxt prepare", + "zip": "wxt zip" }, "repository": { "type": "git",