From bfdb2835c6dddf5f9838a51dabe8346233035c14 Mon Sep 17 00:00:00 2001 From: Rotten-LKZ Date: Sun, 28 Jan 2024 03:22:01 +0800 Subject: [PATCH] feat: github actions for automatically publishing releases --- .github/workflows/publish.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..42903c2 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: "publish" +on: + push: + branches: + - main + tags: + - "v*" + +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: setup node + uses: actions/setup-node@v2 + with: + node-version: 18 + + - name: install dependenies + run: npm install + + - name: build + run: npm run build + + - name: zip + run: | + sudo apt install zip -y + cp manifest.json ./dist/manifest.json + zip LLOneBot.zip ./dist/* -j + + - name: publish + uses: ncipollo/release-action@v1 + with: + artifacts: "LLOneBot.zip" + draft: true + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file