From 9ca91ec9092b80cd9e1e304d2922e19aa8c482fc Mon Sep 17 00:00:00 2001 From: Casper Date: Thu, 15 Feb 2024 19:43:43 +0100 Subject: [PATCH] Update build.yaml --- .github/workflows/build.yaml | 96 +++++++++++++----------------------- 1 file changed, 35 insertions(+), 61 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d3f16bf8..eae16a25 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,42 +2,40 @@ name: Build AutoAWQ Wheels with CUDA on: push: - branches: - - "fix_workflow" - # tags: - # - "v*" + tags: + - "v*" jobs: - # release: - # # Retrieve tag and create release - # name: Create Release - # runs-on: ubuntu-latest - # outputs: - # upload_url: ${{ steps.create_release.outputs.upload_url }} - # steps: - # - name: Checkout - # uses: actions/checkout@v3 + release: + # Retrieve tag and create release + name: Create Release + runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Checkout + uses: actions/checkout@v3 - # - name: Extract branch info - # shell: bash - # run: | - # echo "release_tag=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Extract branch info + shell: bash + run: | + echo "release_tag=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - # - name: Create Release - # id: create_release - # uses: "actions/github-script@v6" - # env: - # RELEASE_TAG: ${{ env.release_tag }} - # with: - # github-token: "${{ secrets.GITHUB_TOKEN }}" - # script: | - # const script = require('.github/workflows/scripts/github_create_release.js') - # await script(github, context, core) + - name: Create Release + id: create_release + uses: "actions/github-script@v6" + env: + RELEASE_TAG: ${{ env.release_tag }} + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + script: | + const script = require('.github/workflows/scripts/github_create_release.js') + await script(github, context, core) build_cuda_wheels: name: Build AWQ with CUDA runs-on: ${{ matrix.os }} - # needs: release + needs: release strategy: matrix: @@ -116,28 +114,16 @@ jobs: python setup.py sdist bdist_wheel - - uses: actions/upload-artifact@v3 - if: runner.os == 'Linux' - with: - name: 'linux-cuda-wheels' - path: ./dist/*.whl - - - uses: actions/upload-artifact@v3 - if: runner.os == 'Windows' + - name: Upload Assets + uses: shogo82148/actions-upload-release-asset@v1 with: - name: 'windows-cuda-wheels' - path: ./dist/*.whl - - # - name: Upload Assets - # uses: shogo82148/actions-upload-release-asset@v1 - # with: - # upload_url: ${{ needs.release.outputs.upload_url }} - # asset_path: ./dist/*.whl + upload_url: ${{ needs.release.outputs.upload_url }} + asset_path: ./dist/*.whl build_rocm_wheels: name: Build AWQ with ROCm runs-on: ${{ matrix.os }} - # needs: release + needs: release strategy: matrix: @@ -239,20 +225,8 @@ jobs: ROCM_VERSION=${{ matrix.rocm }} python setup.py sdist bdist_wheel - - uses: actions/upload-artifact@v3 - if: runner.os == 'Linux' - with: - name: 'linux-cuda-wheels' - path: ./dist/*.whl - - - uses: actions/upload-artifact@v3 - if: runner.os == 'Windows' + - name: Upload Assets + uses: shogo82148/actions-upload-release-asset@v1 with: - name: 'windows-cuda-wheels' - path: ./dist/*.whl - - # - name: Upload Assets - # uses: shogo82148/actions-upload-release-asset@v1 - # with: - # upload_url: ${{ needs.release.outputs.upload_url }} - # asset_path: ./dist/*.whl \ No newline at end of file + upload_url: ${{ needs.release.outputs.upload_url }} + asset_path: ./dist/*.whl \ No newline at end of file