diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce1b914e9..d666a0675 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -191,16 +191,30 @@ jobs: DOCKERHUB_USERNAME: "${{ secrets.CI_DOCKERHUB_USERNAME }}" DOCKERHUB_PASSWORD: "${{ secrets.CI_DOCKERHUB_PASSWORD }}" continue-on-error: true - - name: Rename Release Assets - if: ${{ startsWith(github.ref, 'refs/tags/') }} + - name: Rename CLI Assets + if: ${{ github.event_name != 'pull_request' }} run: | cd .dist/package/${{ matrix.target }}/${{ matrix.task }}/build for file in cli*; do mv "$file" "$(echo "$file" | sed 's/^cli/walrus-cli/')"; done - - name: Upload Release Asset + mkdir cli + cp walrus-cli* cli/ + - name: Release CLI To OSS + uses: TencentCloud/cos-action@b0aa648235fb35a1bdd6a77f529eb0ac4c2f1c25 + if: ${{ github.event_name != 'pull_request' }} + with: + secret_id: ${{ secrets.CI_TECENTCOS_SECRET_ID }} + secret_key: ${{ secrets.CI_TECENTCOS_SECRET_KEY }} + cos_bucket: ${{ secrets.COS_BUCKET }} + cos_region: ${{ secrets.COS_REGION }} + local_path: .dist/package/${{ matrix.target }}/${{ matrix.task }}/build/cli + remote_path: releases/${{ steps.metadata.outputs.version == 'main' && 'latest' || steps.metadata.outputs.version }} + accelerate: true + clean: false + - name: Release CLI To Repository Asset uses: softprops/action-gh-release@v1 if: ${{ startsWith(github.ref, 'refs/tags/') }} with: fail_on_unmatched_files: true tag_name: ${{ steps.metadata.outputs.version }} files: | - .dist/package/${{ matrix.target }}/${{ matrix.task }}/build/walrus-cli* + .dist/package/${{ matrix.target }}/${{ matrix.task }}/build/cli/*