Skip to content

Commit

Permalink
🐎 ci: 修改触发前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
白云苍狗 committed Oct 30, 2023
1 parent cbddc91 commit f946ad5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: NPM Publish
on:
push:
tags:
- "cli*"
- "cli-v*"
jobs:
build:
permissions:
Expand All @@ -24,12 +24,7 @@ jobs:
node ./scripts/publish.mjs
cd ./packages/async-cli
npm run build
npm publish
env:
RELEASE_VERSION: ${{ github.ref }}

- name: Publish
run: |
cd ./packages/async-cli
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion scripts/publish.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (process.env.RELEASE_VERSION) {
const version = process.env.RELEASE_VERSION.split("/").reverse()[0];
console.log("当前版本:", version);
themepkg.version = version.replace("v", "");
clipkg.version = version.replace("cli", "");
clipkg.version = version.replace("cli-v", "");
writeFileSync(resolve(fileURLToPath(import.meta.url), "../../packages/vitepress-theme-async/package.json"), JSON.stringify(themepkg, null, 4), "utf-8");
writeFileSync(resolve(fileURLToPath(import.meta.url), "../../packages/async-cli/package.json"), JSON.stringify(clipkg, null, 4), "utf-8");
}

0 comments on commit f946ad5

Please sign in to comment.