Skip to content

Commit

Permalink
Merge branch 'main' of github.com:zmzimpl/chrome-power-app
Browse files Browse the repository at this point in the history
  • Loading branch information
zmzimpl committed Feb 16, 2025
2 parents c4613b3 + 7415af1 commit 96991d5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,29 @@ jobs:
--publish ${{ inputs.dry-run && 'never' || 'always' }}
${{ matrix.os == 'windows-latest' && '--win' || '' }}
--config.artifactName='${name}-${version}-${arch}-${os}-${buildTime}.${ext}'
# 添加错误处理逻辑
on_retry_command: |
echo "Checking if assets already exist..."
if [[ $ERROR_OUTPUT == *"already_exists"* ]]; then
echo "Assets already exist, treating as success"
exit 0
fi
continue_on_error: true # 允许任务继续执行
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BUILD_TIME: ${{ github.run_number }}

# 添加验证步骤
- name: Verify Release Assets
if: success() || failure() # 即使前一步失败也运行
run: |
RELEASE_URL="https://api.github.com/repos/${{ github.repository }}/releases/latest"
ASSETS=$(curl -H "Authorization: token ${{ secrets.GH_TOKEN }}" $RELEASE_URL)
if echo "$ASSETS" | grep -q "${BUILD_TIME}"; then
echo "Release assets verified successfully"
exit 0
else
echo "Release assets verification failed"
exit 1
fi

0 comments on commit 96991d5

Please sign in to comment.