release notes for next release #861
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: CI-CD | |
| on: [push] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # os: [ubuntu-latest, windows-latest, macos-latest] | |
| os: [ubuntu-latest] | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| exclude: | |
| - os: windows-latest | |
| python-version: "3.11" | |
| - os: windows-latest | |
| python-version: "3.12" | |
| - os: windows-latest | |
| python-version: "3.14" | |
| - os: macos-latest | |
| python-version: "3.11" | |
| - os: macos-latest | |
| python-version: "3.12" | |
| - os: macos-latest | |
| python-version: "3.14" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Python dev files (Ubuntu only) | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| sudo add-apt-repository ppa:deadsnakes/ppa && sudo apt-get update && sudo apt-get install -y python${{ matrix.python-version }}-dev | |
| fi | |
| shell: bash | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Test with tox | |
| run: | |
| uvx --with tox-uv tox -e py${{ matrix.python-version }} | |
| release: | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags') | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.14"] | |
| 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 |