From bfdb2835c6dddf5f9838a51dabe8346233035c14 Mon Sep 17 00:00:00 2001 From: Rotten-LKZ <Rotten_LKZ@163.com> Date: Sun, 28 Jan 2024 03:22:01 +0800 Subject: [PATCH 1/2] 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 From f341e9f6e1b91b49be486e9b1b69c584a7301c87 Mon Sep 17 00:00:00 2001 From: Rotten-LKZ <Rotten_LKZ@163.com> Date: Sun, 28 Jan 2024 03:42:11 +0800 Subject: [PATCH 2/2] fix: cannot start with GITHUB --- .github/workflows/publish.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 42903c2..18c6da3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,6 @@ name: "publish" on: push: - branches: - - main tags: - "v*" @@ -35,4 +33,4 @@ jobs: with: artifacts: "LLOneBot.zip" draft: true - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.RELEASE_TOKEN }} \ No newline at end of file