fix syntex error #13
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: Build-wheels | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# macos-13 is an intel runner, macos-14 is apple silicon | |
os: [ubuntu-latest, windows-latest, windows-2019, macos-13, macos-14] # macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Build wheels | |
run: | | |
pip install build pyufunc grid2demand | |
pip install utdf2gmns exceltomysql exceltosqlserver exceltopostgresql | |
python -m build --wheel --outdir dist | |
- name: build-sdist | |
run: | | |
pipx run build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: | | |
dist/*.tar.gz | |
dist/*.whl | |
upload_pypi: | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
environment: pypi | |
permissions: | |
id-token: write | |
# if: github.event_name == 'release' && github.event.action == 'published' | |
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) | |
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
# unpacks all wheetls artifacts into dist/ | |
pattern: wheels-* | |
path: dist | |
merge-multiple: true | |
- name: Upload package to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
skip-existing: true | |
# - name: Upload package to PyPI | |
# if: github.ref == 'refs/heads/main' | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# user: __token__ | |
# password: ${{ secrets.PYPI_API_TOKEN }} | |
# skip-existing: true |