Release #41
Workflow file for this run
This file contains 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: | |
# push: | |
# # Sequence of patterns matched against refs/tags | |
# tags: | |
# - 'release-v*' # Push events to matching release-v*, i.e. release-v1.0, release-v20.15.10 | |
release: | |
types: [published, edited] | |
jobs: | |
build_sdist: | |
name: Build Source Distribution | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout anaStruct Repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
poetry install | |
- name: Build Source Distribution | |
run: poetry build -f sdist | |
- name: Upload Source Distribution | |
uses: actions/upload-artifact@v4 | |
with: | |
name: anastruct-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] | |
- [ubuntu-latest, musllinux_x86_64] | |
- [macos-13, macosx_x86_64] | |
- [macos-14, macosx_arm64] | |
- [windows-latest, win_amd64] | |
python: ["cp310", "cp311", "cp312"] | |
steps: | |
- name: Checkout anaStruct Repository | |
uses: actions/checkout@v4 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.19.1 | |
env: | |
CIBW_BUILD: "${{ matrix.python }}-${{ matrix.buildplat[1] }}" | |
with: | |
output-dir: dist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: anastruct-${{ 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.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[dev,test] | |
- name: Run linting check with pylint | |
run: | | |
pylint ./anastruct | |
- name: Run formatting checks with black | |
run: | | |
black --check . | |
- name: Run type checks with mypy | |
run: | | |
mypy | |
- name: Run FEM tests with pytest | |
run: | | |
python -m pytest --pspec tests/ | |
publish: | |
name: Publish to PyPI | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Publish to pypi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_PASS }} |