Version 0.17.2 #83
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: | |
| release: | |
| types: [ released ] | |
| workflow_dispatch: | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref_name }} | |
| - uses: fortran-lang/setup-fortran@v1 | |
| if: runner.os == 'Windows' | |
| id: setup-fortran | |
| with: | |
| compiler: gcc | |
| version: 12 | |
| - uses: fortran-lang/setup-fortran@v1 | |
| if: runner.os == 'macOS' | |
| id: setup-fortran-macos | |
| with: | |
| compiler: gcc | |
| version: 12 | |
| - run: ${{ env.FC }} --version | |
| if: runner.os == 'Windows' | |
| env: | |
| FC: ${{ steps.setup-fortran.outputs.fc }} | |
| - run: ${{ env.FC }} --version | |
| if: runner.os == 'macOS' | |
| env: | |
| FC: ${{ steps.setup-fortran-macos.outputs.fc }} | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_SKIP: pp* cp36-* cp37-* cp38-* *musllinux* | |
| CIBW_ARCHS_MACOS: auto64 | |
| CIBW_ARCHS_LINUX: auto64 | |
| CIBW_ARCHS_WINDOWS: auto64 | |
| CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" | |
| CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}" | |
| with: | |
| output-dir: wheelhouse | |
| config-file: "{package}/pyproject.toml" | |
| - name: Print for Debugging | |
| run: ls ./wheelhouse | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Build Source Distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref_name }} | |
| - name: Build sdist | |
| run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: dist/*.tar.gz | |
| upload_pypi: | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Print for info | |
| run: ls dist/ | |
| - name: Upload to twine | |
| uses: pypa/[email protected] | |
| with: | |
| skip_existing: true | |
| user: __token__ | |
| password: ${{ secrets.PYPI }} |