This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user