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

View File

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