mirror of
https://github.com/AIsouler/GKD_subscription.git
synced 2025-12-18 15:55:29 +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 * * *'
|
- 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());"
|
||||||
|
|||||||
Reference in New Issue
Block a user