diff --git a/.github/workflows/build-release-wheel.yaml b/.github/workflows/build-release-wheel.yaml new file mode 100644 index 00000000000..a5f5a250b83 --- /dev/null +++ b/.github/workflows/build-release-wheel.yaml @@ -0,0 +1,57 @@ +name: Build release wheel + +on: + push: + branches: + - 'release/*' + + workflow_dispatch: + inputs: + gitref: + description: "git tag, commit or branch name for the release" + type: string + required: true + default: 'release/1.8 + +jobs: + build-release-wheel: + runs-on: ubuntu-20.04 + steps: + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ inputs.gitref }} + + - name: Build PyPi Wheel + id: build + uses: neuralmagic/nm-actions/actions/pypi_build@main + with: + dev: false + release: true + + - name: Set Env + run: | + pip3 install --upgrade pip && pip3 install --upgrade setuptools + pip3 install virtualenv + virtualenv venv + source venv/bin/activate + + - name: upload whl + uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: "wheel-sparseml" + path: ${{ steps.build.outputs.whlname }} + retention-days: 7 + + - name: upload tar.gz + uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: "tar-sparseml" + path: ${{ steps.build.outputs.tarname }} + retention-days: 7 diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml deleted file mode 100644 index 26d9eb31946..00000000000 --- a/.github/workflows/build-release.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: build-release -run-name: ${{ github.workflow }} is to create release wheel file for pypi -on: - push: - branches: - - 'release/[0-9]+.[0-9]+' - workflow_dispatch: - -jobs: - - BUILD-SPARSEML-RELEASE: - - uses: ./.github/workflows/util.yml - with: - runs_on: ubuntu-22.04 - run_id: ${{ github.run_id }} - build_type: release - testmo_project_id: 9 - secrets: inherit