v0.1.3 #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Publish | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| build-sdist: | |
| name: Build Source Distribution | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| run: uv sync --dev --no-install-project | |
| - name: Build Source Distribution | |
| run: uv build --sdist | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: python-package-distributions-sdist | |
| path: dist/*.tar.gz | |
| build-wheels: | |
| name: Build | |
| strategy: | |
| matrix: | |
| python-version: ["3.12", "3.13", "3.14"] | |
| # architecture: ["x86", "x86_64"] | |
| architecture: ["x86"] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| run: uv sync --dev --no-install-project | |
| - name: Build | |
| run: uv build --python cpython-${{ matrix.python-version }}-windows-${{ matrix.architecture }}-none | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: python-package-distributions-${{ matrix.python-version }}-${{ matrix.architecture }} | |
| path: dist/*.whl | |
| publish-to-pypi: | |
| name: Publish to PyPI | |
| needs: | |
| - build-sdist | |
| - build-wheels | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/pyd2d | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download the artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| pattern: python-package-distributions-* | |
| merge-multiple: true | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| github-release: | |
| name: Create GitHub Release | |
| needs: | |
| - publish-to-pypi | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Download the artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: python-package-distributions-* | |
| merge-multiple: true | |
| path: dist/ | |
| - name: Sign the dists with Sigstore | |
| uses: sigstore/[email protected] | |
| with: | |
| inputs: >- | |
| ./dist/*.tar.gz | |
| ./dist/*.whl | |
| - name: Create GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: >- | |
| gh release create | |
| "$GITHUB_REF_NAME" | |
| --repo "$GITHUB_REPOSITORY" | |
| --notes "" | |
| - name: Upload artifacts and signatures to GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: >- | |
| gh release upload | |
| "$GITHUB_REF_NAME" dist/** | |
| --repo "$GITHUB_REPOSITORY" |