mirror of
https://github.com/AIsouler/GKD_subscription.git
synced 2025-12-17 07:18:24 +08:00
perf: build_release
classic tokens 已废弃:https://github.blog/changelog/2025-12-09-npm-classic-tokens-revoked-session-based-auth-and-cli-token-management-now-available/
This commit is contained in:
13
.github/workflows/build_release.yml
vendored
13
.github/workflows/build_release.yml
vendored
@@ -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());"
|
||||
|
||||
Reference in New Issue
Block a user