diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 34ed6de..bff8879 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,13 +1,6 @@ name: CHECK -on: - push: - branches: - - main - - pull_request: - branches: - - main +on: [push, pull_request] jobs: check: diff --git a/.github/workflows/release-tag.yaml b/.github/workflows/release-tag.yaml new file mode 100644 index 0000000..30f0fb2 --- /dev/null +++ b/.github/workflows/release-tag.yaml @@ -0,0 +1,24 @@ +name: Create Release Tag + +on: + push: + tags: + - 'v*' + +jobs: + release-tag: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@master + + - name: Create Release Tag + id: release_tag + uses: yyx990803/release-tag@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + body: | + 更新内容请查看[CHANGELOG](https://github.com/varletjs/varlet/blob/dev/CHANGELOG.md)。 + Please refer to [CHANGELOG](https://github.com/varletjs/varlet/blob/dev/CHANGELOG.md) for details. diff --git a/package.json b/package.json index 9865310..7479dd5 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,10 @@ "vr": "bin/index.js" }, "scripts": { + "preinstall": "npx only-allow pnpm", "build": "tsc --noEmit && tsup", "dev": "node bin/index.js", - "test": "pnpm run build && pnpm run dev", + "release": "pnpm run build && pnpm run dev release", "checkAll": "tsc --noEmit && eslint --ext .ts,.js" }, "packageManager": "pnpm@8.7.5",