From cd0625d3d422e829dd4d581e4489ff19318ea5c6 Mon Sep 17 00:00:00 2001 From: taoliujun Date: Wed, 24 Jan 2024 13:38:42 +0800 Subject: [PATCH] chore: add release action --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 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 0000000..dcc5d87 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: release +run-name: '${{github.workflow}}' +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: init pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: init node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + cache-dependency-path: | + src/pnpm-lock.yaml + .github/actions/issue-to-hexo/pnpm-lock.yaml + + - name: install dependencies + run: pnpm install + + - name: build + run: pnpm run build + + - name: release + run: | + NPM_TOKEN=${{secrets.NPM_TOKEN}} pnpm run release:token