chore: fix grep pipefail 版本 更新
Node.js Build / build (push) Failing after 10s

This commit is contained in:
windychen
2026-07-21 00:16:35 +08:00
parent 9223f3c5ff
commit 9b4a9ea97d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ jobs:
run: |
npm config set //gitea:3000/api/packages/windychen/npm/:_authToken ${{ secrets.NPM_GITEA_TOKEN }}
VERSION=$(node -p "require('./package.json').version")
EXISTS=$(curl -s "http://gitea:3000/api/v1/packages/windychen?q=windychen-utils" -H "Authorization: token ${{ secrets.NPM_GITEA_TOKEN }}" | grep -c "\"version\":\"$VERSION\"")
EXISTS=$(curl -s "http://gitea:3000/api/v1/packages/windychen?q=windychen-utils" -H "Authorization: token ${{ secrets.NPM_GITEA_TOKEN }}" | grep -c "\"version\":\"$VERSION\"" || true)
if [ "$EXISTS" -gt 0 ]; then
echo "Gitea: version $VERSION already exists, skipping."
echo "Gitea|skipped|版本 ${VERSION} 已存在" >> /tmp/publish_result.txt
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "windychen-utils",
"version": "1.1.10",
"version": "1.1.11",
"main": "dist/windychen-utils.cjs.js",
"module": "dist/windychen-utils.esm.js",
"browser": "dist/windychen-utils.js",