From 41515db7a499cfb04b8395f08144e67fca7dbf5d Mon Sep 17 00:00:00 2001 From: Shigma Date: Thu, 16 May 2024 01:11:39 +0800 Subject: [PATCH] update --- .github/workflows/build.yml | 2 +- .github/workflows/tag.yml | 22 +++++++++++----------- .github/workflows/upload.sh | 2 +- cordis.yml | 2 ++ package.json | 9 +++++---- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 427495f..0ae6678 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,4 +78,4 @@ jobs: bash .github/workflows/upload.sh '${{ matrix.target.platform }}-${{ steps.vars.outputs.ARCH }}-node${{ steps.vars.outputs.NODE_VERSION }}' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 92d35cb..98e29f9 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -8,10 +8,14 @@ on: jobs: release: permissions: + actions: write contents: write runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: - name: Check out uses: actions/checkout@v4 @@ -24,14 +28,10 @@ jobs: - name: Create release if: ${{ steps.version.outputs.tag }} - run: > - curl - -X POST - -H "Accept: application/vnd.github.v3+json" - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" - https://api.github.com/repos/${{ github.repository }}/releases - -d '{ - "name": "${{ steps.version.outputs.tag }}", - "tag_name": "${{ steps.version.outputs.tag }}", - "target_commitish": "${{ github.sha }}" - }' + run: gh release create ${{ steps.version.outputs.tag }} --title ${{ steps.version.outputs.tag }} + + - name: Build + run: gh workflow run build --ref ${{ steps.version.outputs.tag }} + + - name: Publish + run: gh workflow run npm --ref ${{ steps.version.outputs.tag }} diff --git a/.github/workflows/upload.sh b/.github/workflows/upload.sh index ae97054..19e1f68 100644 --- a/.github/workflows/upload.sh +++ b/.github/workflows/upload.sh @@ -1,7 +1,7 @@ variant=$1 name=$(cat package.json | jq -r '.name' | cut -d / -f 2) -tag_name=$(gh release view --json name --jq .name) +tag_name=$(gh release view --json tagName --jq .tagName) upload_file=$RUNNER_TEMP/$name-$tag_name-$variant.zip echo name: $name diff --git a/cordis.yml b/cordis.yml index 0ace7f2..0aef008 100644 --- a/cordis.yml +++ b/cordis.yml @@ -123,6 +123,8 @@ name: '@cordisjs/plugin-webui' - id: ks2osk name: '@cordisjs/plugin-manager' + - id: 4cj730 + name: '@cordisjs/plugin-notifier' - id: iyq73n name: cordis/group label: Satori diff --git a/package.json b/package.json index ec139cd..b30d33b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@satorijs/boilerplate", - "version": "0.0.2", + "version": "0.0.3", "private": true, "files": [ ".env", @@ -38,9 +38,10 @@ "@cordisjs/plugin-hmr": "^0.2.1", "@cordisjs/plugin-http": "^0.4.2", "@cordisjs/plugin-manager": "^0.1.0", + "@cordisjs/plugin-notifier": "^0.1.0", "@cordisjs/plugin-proxy-agent": "^0.3.0", "@cordisjs/plugin-server": "^0.2.2", - "@cordisjs/plugin-webui": "^0.1.1", + "@cordisjs/plugin-webui": "^0.1.3", "@satorijs/adapter-discord": "^4.5.0", "@satorijs/adapter-kook": "^4.6.0", "@satorijs/adapter-qq": "^4.7.0", @@ -49,8 +50,8 @@ "@satorijs/core": "^4.0.0", "@satorijs/plugin-database": "^0.1.1", "@satorijs/plugin-server": "^2.5.0", - "@satorijs/plugin-status": "^0.1.0", - "cordis": "^3.15.0", + "@satorijs/plugin-status": "^0.1.1", + "cordis": "^3.15.1", "minato": "^3.3.0" } }