Refactor ordinal number extraction, add CI for Windows, make sure war… #21
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: ADR-Py CI | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| pull_request: | |
| branches: | |
| - "**" | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest", "windows-latest"] | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install the latest version of uv and set the python version | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| activate-environment: true | |
| - name: Install project dependencies | |
| run: make sync-deps | |
| - name: Run lint | |
| run: make lint-ci | |
| - name: Run tests | |
| run: make test | |
| publish: | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install the latest version of uv and set the python version | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.11" | |
| enable-cache: true | |
| activate-environment: true | |
| - name: Install project dependencies | |
| run: make sync-deps | |
| - name: Build package | |
| run: uv build | |
| - name: Publish to PyPI | |
| run: uv publish --token ${{ secrets.PYPI_TOKEN }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: dist/* |