Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Dec 19, 2024
1 parent f75ce7c commit fb1cb57
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/macos-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
20 changes: 11 additions & 9 deletions sapi/scripts/tencentyun-upload-cloud-object-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit fb1cb57

Please sign in to comment.