Skip to content

Add workflow to publish to PyPI #9

Add workflow to publish to PyPI

Add workflow to publish to PyPI #9

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
lint:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up poetry
run: |
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install poetry
- name: Install dependencies
run: poetry install
- name: Run mypy
run: poetry run mypy pyqt_spellcheck
- name: Lint with ruff
run: poetry run ruff check pyqt_spellcheck
pypi-publish:
name: Publish to PyPI
needs: lint
runs-on: macos-latest
environment: release
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Set up poetry
run: |
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install poetry
- name: Install dependencies
run: poetry install
- name: Build
run: poetry build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1