diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3f0e3cb..a56d20d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,15 @@ on: AC_PROVIDER: description: "AC_PROVIDER" required: true + TENCENT_AK: + description: "TENCENT_AK" + required: true + TENCENT_SK: + description: "TENCENT_SK" + required: true + RELEASE_BUCKET: + description: "RELEASE_BUCKET" + required: true jobs: linux-amd64-build-job: @@ -65,6 +74,19 @@ jobs: asset_path: ./mo-${{ steps.get_release.outputs.tag_name }}-linux-x86_64.zip asset_name: mo-${{ steps.get_release.outputs.tag_name }}-linux-x86_64.zip asset_content_type: application/zip + - name: Upload Artifact to COS + uses: matrixorigin/CI/actions/upload-artifact-oss@main + with: + access_key: ${{ secrets.TENCENT_AK }} + secret_key: ${{ secrets.TENCENT_SK }} + artifact_path: ${{ github.workspace }}/mo-${{ steps.get_release.outputs.tag_name }}-linux-x86_64.zip + bucket: ${{ secrets.RELEASE_BUCKET }} + oss_path: matrixone/${{ steps.get_release.outputs.tag_name }} + provider: cos + region: ap-shanghai + retry_times: 5 + storage_class: "STANDARD" + linux-arm64-build-job: runs-on: aws-arm64-runner @@ -113,6 +135,18 @@ jobs: asset_path: ./mo-${{ steps.get_release.outputs.tag_name }}-linux-arm64.zip asset_name: mo-${{ steps.get_release.outputs.tag_name }}-linux-arm64.zip asset_content_type: application/zip + - name: Upload Artifact to COS + uses: matrixorigin/CI/actions/upload-artifact-oss@main + with: + access_key: ${{ secrets.TENCENT_AK }} + secret_key: ${{ secrets.TENCENT_SK }} + artifact_path: ${{ github.workspace }}/mo-${{ steps.get_release.outputs.tag_name }}-linux-arm64.zip + bucket: ${{ secrets.RELEASE_BUCKET }} + oss_path: matrixone/${{ steps.get_release.outputs.tag_name }} + provider: cos + region: ap-shanghai + retry_times: 5 + storage_class: "STANDARD" darwin-x86-build-job: runs-on: macos-latest @@ -153,7 +187,6 @@ jobs: p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} # The password used to import the PKCS12 file. p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} - - name: Clone gon uses: actions/checkout@v4 with: @@ -167,7 +200,6 @@ jobs: make; chmod +x gon; echo "$(pwd)" >> $GITHUB_PATH; - - name: Code signing and app notarization env: AC_PASSWORD: ${{ secrets.AC_PASSWORD }} @@ -209,6 +241,29 @@ jobs: asset_path: ./mo-${{ steps.get_release.outputs.tag_name }}-darwin-x86_64.zip asset_name: mo-${{ steps.get_release.outputs.tag_name }}-darwin-x86_64.zip asset_content_type: application/zip + - name: Checkout matrixorigin/CI + uses: actions/checkout@v4 + with: + fetch-depth: '1' + repository: matrixorigin/CI + ref: main + path: ./CI + - name: Upload Artifact to COS + run: | + cd ${{ github.workspace }}/CI/actions/upload-artifact-oss; + make build; + ./action; + env: + INPUT_ACCESS_KEY: ${{ secrets.TENCENT_AK }} + INPUT_ARTIFACT_PATH: ${{ github.workspace }}/mo-${{ steps.get_release.outputs.tag_name }}-darwin-x86_64.zip + INPUT_BUCKET: ${{ secrets.RELEASE_BUCKET }} + INPUT_OSS_PATH: matrixone/${{ steps.get_release.outputs.tag_name }} + INPUT_PROVIDER: cos + INPUT_REGION: ap-shanghai + INPUT_RETRY_TIMES: 5 + INPUT_SECRET_KEY: ${{ secrets.TENCENT_SK }} + INPUT_STORAGE_CLASS: "STANDARD" + #if the release for darwin-arm is failed, please contact guguducken to check runner status darwin-arm-build-job: @@ -291,6 +346,28 @@ jobs: asset_path: ./mo-${{ steps.get_release.outputs.tag_name }}-darwin-arm64.zip asset_name: mo-${{ steps.get_release.outputs.tag_name }}-darwin-arm64.zip asset_content_type: application/zip + - name: Checkout matrixorigin/CI + uses: actions/checkout@v4 + with: + fetch-depth: '1' + repository: matrixorigin/CI + ref: main + path: ./CI + - name: Upload Artifact to COS + run: | + cd ${{ github.workspace }}/CI/actions/upload-artifact-oss; + make build; + ./action; + env: + INPUT_ACCESS_KEY: ${{ secrets.TENCENT_AK }} + INPUT_ARTIFACT_PATH: ${{ github.workspace }}/mo-${{ steps.get_release.outputs.tag_name }}-darwin-arm64.zip + INPUT_BUCKET: ${{ secrets.RELEASE_BUCKET }} + INPUT_OSS_PATH: matrixone/${{ steps.get_release.outputs.tag_name }} + INPUT_PROVIDER: cos + INPUT_REGION: ap-shanghai + INPUT_RETRY_TIMES: 5 + INPUT_SECRET_KEY: ${{ secrets.TENCENT_SK }} + INPUT_STORAGE_CLASS: "STANDARD" - name: Remove Code-Signing Certificates if: ${{ always() }} run: |