diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..ba73cf6 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,51 @@ +name: Build + +on: + push: + tags: + - v* + +jobs: + build_dist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build dist and wheel + run: pipx run build --sdist --wheel + + - uses: actions/upload-artifact@v4 + with: + name: cibw-dist + path: dist/* + + # upload_pypi: + # needs: [build_dist] + # runs-on: [self-hosted, linux, x64, cpu-only] + # environment: release + # permissions: + # id-token: write + # steps: + # - uses: actions/download-artifact@v4 + # with: + # pattern: cibw-* + # path: dist + # merge-multiple: true + + # - uses: pypa/gh-action-pypi-publish@release/v1 + + upload_release: + needs: [build_dist] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + pattern: cibw-* + path: dist + merge-multiple: true + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: dist/*