From ada203ed6c434b8b428ce55ce91ed7403db11b94 Mon Sep 17 00:00:00 2001 From: "Mr.Mao" <951416545@qq.com> Date: Thu, 1 Jun 2023 11:10:16 +0800 Subject: [PATCH] build: update package manager and workflow This commit updates the package manager to pnpm@8.1.1 and adds a new workflow for releases triggered by git tags. The workflow uses actions/checkout@v3 to fetch the latest changes, pnpm/action-setup@v2 to install pnpm, and actions/setup-node@v3 to set the node version to 18.x and cache pnpm. Finally, it runs npx changelogithub to generate a changelog for the release, using the GITHUB_TOKEN secret. --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..fdb16570 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Set node + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: pnpm + + - run: npx changelogithub + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package.json b/package.json index 3ea97ba5..a01c0895 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "hairylib", "version": "0.0.0", "private": true, + "packageManager": "pnpm@8.1.1", "description": "hairylib 使用 changeset 管理的多个模块包(monorepo)的工具项目。", "author": "hairyf", "license": "MIT",