chore: publish 优化

This commit is contained in:
xiaojunnuo
2026-01-22 13:50:20 +08:00
parent 5074a91669
commit d1ebc08478
4 changed files with 7 additions and 10 deletions

View File

@@ -30,7 +30,7 @@ jobs:
- name: publish_to_github
id: publish_to_github
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
export GITHUB_TOKEN=${{ secrets.GH_TOKEN }}
rm -rf ./pnpm*.yaml
npm install -g pnpm
pnpm install

View File

@@ -164,10 +164,9 @@ async function publishToAtomgit() {
console.log("publishToAtomgit success")
}catch(error){
if (error?.response?.data){
console.log("publishToAtomgit error:",error.response.data)
}else{
console.log("publishToAtomgit error:",error)
throw new Error("publishToAtomgit error:",error.response.data)
}
throw new Error("publishToAtomgit error:",error)
}
}

View File

@@ -34,10 +34,9 @@ async function publishToGitee() {
console.log("publishToGitee success")
} catch (error) {
if (error?.response?.data){
console.log("publishToGitee error:",error.response.data)
}else{
console.log("publishToGitee error:",error)
throw new Error("publishToGitee error:",error.response.data)
}
throw new Error("publishToGitee error:",error)
}
}

View File

@@ -34,10 +34,9 @@ async function publishToGithub() {
console.log("publishToGithub success")
} catch (error) {
if (error?.response?.data){
console.log("publishToGithub error:",error.response.data)
}else{
console.log("publishToGithub error:",error)
throw new Error("publishToGithub error:",error.response.data)
}
throw new Error("publishToGithub error:",error)
}
}