AIsouler
2025-12-11 19:20:08 +08:00
parent 212d7b09c6
commit 2c9b59c969

View File

@@ -5,6 +5,10 @@ on:
- cron: '0 19 * * *' - cron: '0 19 * * *'
workflow_dispatch: workflow_dispatch:
permissions:
id-token: write
contents: write
jobs: jobs:
check_changes: check_changes:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -34,7 +38,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
version: ${{ steps.version.outputs.version }} version: ${{ steps.version.outputs.version }}
changes_detected: ${{ steps.changes.outputs.changed }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@@ -43,6 +46,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 22 node-version: 22
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v4 - uses: pnpm/action-setup@v4
@@ -76,7 +80,7 @@ jobs:
- name: Create Release - name: Create Release
id: create_release id: create_release
if: ${{ steps.commit.outcome == 'success' }} if: ${{ steps.commit.outcome == 'success' }}
uses: actions/create-release@v1 uses: softprops/action-gh-release@v2
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
@@ -85,11 +89,8 @@ jobs:
body_path: ./dist/CHANGELOG.md body_path: ./dist/CHANGELOG.md
- name: Publish package - name: Publish package
env: if: ${{ steps.commit.outcome == 'success' }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.commit.outcome == 'success' && env.NPM_TOKEN != '' }}
run: | run: |
pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
node -e "import('@gkd-kit/tools').then((m) => m.updatePkgVersion());" node -e "import('@gkd-kit/tools').then((m) => m.updatePkgVersion());"
pnpm publish --no-git-checks pnpm publish --no-git-checks
node -e "import('@gkd-kit/tools').then((m) => m.syncNpmmirror());" node -e "import('@gkd-kit/tools').then((m) => m.syncNpmmirror());"