Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
refactor: release latest cli to oss
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwantaozi authored and thxCode committed Nov 22, 2023
1 parent bc3d343 commit 974b157
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

0 comments on commit 974b157

Please sign in to comment.