Merge branch 'fix-windows-paths' into develop #249
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: CI-CD | |
on: [push] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
exclude: | |
- os: windows-latest | |
python-version: "3.10" | |
- os: windows-latest | |
python-version: "3.11" | |
- os: windows-latest | |
python-version: "3.13" | |
- os: macos-latest | |
python-version: "3.10" | |
- os: macos-latest | |
python-version: "3.11" | |
- os: macos-latest | |
python-version: "3.13" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv and set the python version | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
enable-cache: true | |
# - 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 wheel | |
# python -m pip install tox tox-gh-actions | |
- name: Test with tox | |
run: | |
uvx --with tox-uv tox -- | |
# tox -- | |
release: | |
needs: test | |
if: startsWith(github.ref, 'refs/tags') | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.13"] | |
environment: | |
name: pypi | |
url: https://pypi.org/p/<your-pypi-project-name> | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get tag | |
id: tag | |
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install hatch twine | |
- name: Build package | |
# run: python setup.py sdist bdist_wheel | |
run: hatch build | |
- name: Check the package | |
run: twine check dist/* | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: dist | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: "release-notes/${{ github.ref_name }}.md" | |
draft: false | |
prerelease: false |