From fb1cb57fb29d390a04b871765e05edfebe18a5fd Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Thu, 19 Dec 2024 21:54:53 +0800 Subject: [PATCH] update --- .github/workflows/linux-aarch64.yml | 4 ++-- .github/workflows/linux-x86_64.yml | 4 ++-- .github/workflows/macos-aarch64.yml | 4 ++-- .github/workflows/macos-x86_64.yml | 2 +- .../tencentyun-upload-cloud-object-storage.sh | 20 ++++++++++--------- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/linux-aarch64.yml b/.github/workflows/linux-aarch64.yml index 2931c6bc16..261a6cac2b 100644 --- a/.github/workflows/linux-aarch64.yml +++ b/.github/workflows/linux-aarch64.yml @@ -185,9 +185,9 @@ jobs: files: swoole-cli-v${{ env.APP_VERSION }}-linux-arm64.tar.xz - name: upload artifacts to cloud object storage - if: (startsWith(github.ref, 'refs/tags/v')) && (github.repository == 'swoole/swoole-cli') + # if: (startsWith(github.ref, 'refs/tags/v')) && (github.repository == 'swoole/swoole-cli') env: SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} run: | - bash sapi/scripts/tencentyun-upload-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-cygwin-x64.zip + bash sapi/scripts/tencentyun-upload-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-linux-arm64.tar.xz diff --git a/.github/workflows/linux-x86_64.yml b/.github/workflows/linux-x86_64.yml index 80dd5a56c8..47ef8f4898 100644 --- a/.github/workflows/linux-x86_64.yml +++ b/.github/workflows/linux-x86_64.yml @@ -166,9 +166,9 @@ jobs: files: swoole-cli-v${{ env.APP_VERSION }}-linux-x64.tar.xz - name: upload artifacts to cloud object storage - if: (startsWith(github.ref, 'refs/tags/v')) && (github.repository == 'swoole/swoole-cli') + # if: (startsWith(github.ref, 'refs/tags/v')) && (github.repository == 'swoole/swoole-cli') env: SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} run: | - bash sapi/scripts/tencentyun-upload-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-cygwin-x64.zip + bash sapi/scripts/tencentyun-upload-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-linux-x64.tar.xz diff --git a/.github/workflows/macos-aarch64.yml b/.github/workflows/macos-aarch64.yml index 5007245063..f4d5ee8c43 100644 --- a/.github/workflows/macos-aarch64.yml +++ b/.github/workflows/macos-aarch64.yml @@ -150,9 +150,9 @@ jobs: files: swoole-cli-v${{ env.APP_VERSION }}-macos-arm64.tar.xz - name: upload artifacts to cloud object storage - if: (startsWith(github.ref, 'refs/tags/v')) && (github.repository == 'swoole/swoole-cli') + # if: (startsWith(github.ref, 'refs/tags/v')) && (github.repository == 'swoole/swoole-cli') env: SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} run: | - bash sapi/scripts/tencentyun-upload-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-cygwin-x64.zip + bash sapi/scripts/tencentyun-upload-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-macos-arm64.tar.xz diff --git a/.github/workflows/macos-x86_64.yml b/.github/workflows/macos-x86_64.yml index cf44294be0..7b217da294 100644 --- a/.github/workflows/macos-x86_64.yml +++ b/.github/workflows/macos-x86_64.yml @@ -150,7 +150,7 @@ jobs: files: swoole-cli-v${{ env.APP_VERSION }}-macos-x64.tar.xz - name: upload artifacts to cloud object storage - if: (startsWith(github.ref, 'refs/tags/v')) && (github.repository == 'swoole/swoole-cli') + # if: (startsWith(github.ref, 'refs/tags/v')) && (github.repository == 'swoole/swoole-cli') env: SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} diff --git a/sapi/scripts/tencentyun-upload-cloud-object-storage.sh b/sapi/scripts/tencentyun-upload-cloud-object-storage.sh index 268ff50067..f671cb37fe 100644 --- a/sapi/scripts/tencentyun-upload-cloud-object-storage.sh +++ b/sapi/scripts/tencentyun-upload-cloud-object-storage.sh @@ -76,7 +76,7 @@ while [ $# -gt 0 ]; do shift $(($# > 0 ? 1 : 0)) done -${__PROJECT__}/var/upload-release-oss/coscli --help +# ${__PROJECT__}/var/upload-release-oss/coscli --help CLOUD_OBJECT_STORAGE_CONFIG=${__PROJECT__}/var/upload-release-oss/.tencentyun-cloud-object-storage.yaml if [ ! -f ${CLOUD_OBJECT_STORAGE_CONFIG} ]; then @@ -86,12 +86,14 @@ if [ ! -f ${CLOUD_OBJECT_STORAGE_CONFIG} ]; then sed -i.bak "s/\${{ secrets.QCLOUD_OSS_SECRET_KEY }}/${SECRET_KEY}/" ${CLOUD_OBJECT_STORAGE_CONFIG} fi fi -COSCLI="${__PROJECT__}/var/upload-release-oss/coscli " -${COSCLI} --config-path ${CLOUD_OBJECT_STORAGE_CONFIG} ls cos://wenda-1252906962/dist/ +COSCLI="${__PROJECT__}/var/upload-release-oss/coscli --config-path ${CLOUD_OBJECT_STORAGE_CONFIG} " +COS_BUCKET_FOLDER="cos://wenda-1257035567/dist/" + +${COSCLI} ls ${COS_BUCKET_FOLDER} if [ "${UPLOAD_TYPE}" = 'single' ]; then - ${COSCLI} sync ${UPLOAD_FILE} cos://wenda-1252906962/dist/ + ${COSCLI} sync ${UPLOAD_FILE} ${COS_BUCKET_FOLDER} exit 0 fi @@ -106,11 +108,11 @@ if [ "${UPLOAD_TYPE}" = 'all' ]; then fi cd ${__PROJECT__}/var/artifact-hash/${SWOOLE_CLI_VERSION} - ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-cygwin-x64.zip cos://wenda-1252906962/dist/ - ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-linux-arm64.tar.xz cos://wenda-1252906962/dist/ - ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-linux-x64.tar.xz cos://wenda-1252906962/dist/ - ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-macos-arm64.tar.xz cos://wenda-1252906962/dist/ - ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-macos-x64.tar.xz cos://wenda-1252906962/dist/ + ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-cygwin-x64.zip ${COS_BUCKET_FOLDER} + ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-linux-arm64.tar.xz ${COS_BUCKET_FOLDER} + ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-linux-x64.tar.xz ${COS_BUCKET_FOLDER} + ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-macos-arm64.tar.xz ${COS_BUCKET_FOLDER} + ${COSCLI} sync swoole-cli-${SWOOLE_VERSION}-macos-x64.tar.xz ${COS_BUCKET_FOLDER} cd ${__PROJECT__} exit 0