From 68aa2f0b38f98bff2fb016c7296a096c4cb7f54d Mon Sep 17 00:00:00 2001 From: Demo Macro Date: Thu, 13 Jul 2023 13:50:13 +0800 Subject: [PATCH] ci: use github actions to create release --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 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..02c1056 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3.0.0 + with: + node-version: "18" + + - name: Install pnpm + run: corepack enable && corepack prepare pnpm@latest --activate + + - name: Install dependencies + run: pnpm install + + - name: Build Docen + run: pnpm -r bundle + + - name: Release + uses: softprops/action-gh-release@v0.1.14 + if: startsWith(github.ref, 'refs/tags/') + with: + files: "packages/docen/dist/bundle/**"