diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 44cece1..da29c73 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,9 @@ updates: directory: "/" schedule: interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "daily" diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml new file mode 100644 index 0000000..ae04f10 --- /dev/null +++ b/.github/workflows/mypy.yml @@ -0,0 +1,32 @@ +name: Python application - MyPy + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + name: Python ${{ matrix.python-version }} sample + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{matrix.python-version}} + + - name: Install poetry + run: | + python -m pip install --upgrade pip poetry + poetry install + + - name: Test with MyPy + run: | + poetry run mypy . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5f75067 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +on: + release: + types: + - published + +name: release + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/pysanejs + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Poetry + run: python -m pip install --upgrade pip poetry + - name: Build artifacts + run: poetry build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1