release-v1.7.0 #51
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: Release | |
| on: | |
| release: | |
| types: [published, edited] | |
| jobs: | |
| build_sdist: | |
| name: Build Source Distribution | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: Checkout anaStruct Repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade poetry | |
| poetry install | |
| - name: Build Source Distribution | |
| run: poetry build -f sdist | |
| - name: Upload Source Distribution | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: cibw-sdist | |
| path: dist/*.tar.gz | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
| needs: build_sdist | |
| runs-on: ${{ matrix.buildplat[0] }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| buildplat: | |
| - [ubuntu-latest, manylinux_x86_64, x86_64] | |
| - [ubuntu-latest, manylinux_aarch64, aarch64] | |
| - [ubuntu-latest, musllinux_x86_64, x86_64] | |
| - [macos-15-intel, macosx_x86_64, x86_64] | |
| - [macos-latest, macosx_arm64, arm64] | |
| - [windows-latest, win_amd64, AMD64] | |
| python: ["cp310", "cp311", "cp312", "cp313", "cp314"] | |
| steps: | |
| - name: Set up QEMU for aarch64 | |
| if: matrix.buildplat[1] == 'manylinux_aarch64' | |
| uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: arm64 | |
| - name: Checkout anaStruct Repository | |
| uses: actions/checkout@v6 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.4.1 | |
| env: | |
| CIBW_BUILD: "${{ matrix.python }}-${{ matrix.buildplat[1] }}" | |
| CIBW_ARCHS: "${{ matrix.buildplat[2] }}" | |
| with: | |
| output-dir: dist | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: cibw-wheels-${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
| path: ./dist/*.whl | |
| run_tests: | |
| name: Fully Test Release Package with Release Dependencies | |
| needs: build_sdist | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install poetry | |
| run: pipx install poetry | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "poetry" | |
| - name: Install dependencies | |
| run: | | |
| poetry install | |
| - name: Run linting check with pylint | |
| run: | | |
| poetry run pylint ./anastruct | |
| - name: Run formatting checks with black | |
| run: | | |
| poetry run black --check . | |
| - name: Run type checks with mypy | |
| run: | | |
| poetry run mypy | |
| - name: Run FEM tests with pytest | |
| run: | | |
| poetry run pytest | |
| publish: | |
| name: Publish to PyPI | |
| needs: | |
| - build_sdist | |
| - build_wheels | |
| - run_tests | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| pattern: cibw-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Display our files | |
| run: ls dist | |
| - name: Publish to pypi | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_PASS }} |