Repository navigation
1.0.1: pin pytypehint==1.2.1 #3
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 distributions | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-2022] | |
| python: ['3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - run: python -m pip install . pytest | |
| - run: python -m pytest -q | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: A release tag is v plus the package version | |
| if: github.event_name == 'release' | |
| run: | | |
| version=$(grep -Po '^__version__ = "\K[^"]+' pyeasydeploy/__init__.py) | |
| test "${{ github.event.release.tag_name }}" = "v$version" || { | |
| echo "Release tag ${{ github.event.release.tag_name }} is not v$version (pyeasydeploy/__init__.py)" | |
| exit 1 | |
| } | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - run: python -m pip install build twine pytest | |
| - name: Build sdist and wheel | |
| run: python -m build | |
| - run: python -m twine check dist/* | |
| - name: Test the built wheel | |
| run: | | |
| python -m pip install dist/*.whl | |
| python -m pytest -q | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-python | |
| path: dist/* | |
| if-no-files-found: error | |
| publish_to_pypi: | |
| name: Publish to PyPI | |
| needs: [build] | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| runs-on: ubuntu-latest | |
| environment: pypi-release | |
| permissions: | |
| id-token: write | |
| concurrency: | |
| group: pypi-release | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: dist-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |