From 7a4db92f3fa437bbe221ad2203b43bd7a51e0b24 Mon Sep 17 00:00:00 2001 From: smartgoo Date: Tue, 19 Nov 2024 10:58:03 -0500 Subject: [PATCH] ci --- .github/workflows/deploy.yaml | 42 +++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 6352e52ce..0f0d400e0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -399,17 +399,51 @@ jobs: pwd Get-ChildItem -Recurse echo "archive=$ZIP_NAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - name: Upload release asset + # - name: Upload release asset + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ github.event.release.upload_url }} + # asset_path: "./python/target/${{ matrix.platform.target }}/${{ env.archive }}.zip" + # asset_name: "${{ env.archive }}.zip" + # asset_content_type: application/zip + - name: Move wheels to artifacts directory + run: | + sudo mkdir -p artifacts + sudo mv python/target/${{ matrix.platform.target }}/dist/* artifacts/ + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: python-sdk-artifacts-${{ matrix.platform.target }} + path: artifacts + + collect-python-sdk-artifacts: + name: Collect Python SDK Artifacts + needs: build-python-sdk + runs-on: ubuntu-latest + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: all_artifacts + - name: Create single zip of artifacts + run: | + sudo mkdir -p combined_artifacts + sudo find all_artifacts -type f -exec mv {} combined_artifacts/ \; + cd combined_artifacts + sudo zip -r ../kaspa-python-sdk-${{ github.event.release.tag_name }}.zip . + cd .. + - name: Upload consolidated release asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: "./python/target/${{ matrix.platform.target }}/${{ env.archive }}.zip" - asset_name: "${{ env.archive }}.zip" + asset_path: ./kaspa-python-sdk-${{ github.event.release.tag_name }}.zip + asset_name: "kaspa-python-sdk-${{ github.event.release.tag_name }}.zip" asset_content_type: application/zip - # build-python-sdist: # name: Build Python SDK sdist # runs-on: ubuntu-latest