From 4552f097b5d2ee60318673786a0f0e6311f5b95d Mon Sep 17 00:00:00 2001 From: Rewrite0 Date: Thu, 4 May 2023 16:06:17 +0800 Subject: [PATCH] workflow: create release draft --- .github/workflows/create-release-draft.yaml | 39 +++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/create-release-draft.yaml diff --git a/.github/workflows/create-release-draft.yaml b/.github/workflows/create-release-draft.yaml new file mode 100644 index 00000000..329d89aa --- /dev/null +++ b/.github/workflows/create-release-draft.yaml @@ -0,0 +1,39 @@ +name: Create Release Draft + +on: + push: + tags: + - 'v*.*.*' + +permissions: + contents: write + discussions: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: latest + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: latest + run_install: true + + - name: Build + run: pnpm build && zip -r dist.zip dist + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + draft: true + files: dist.zip