chore(release): version 1.1.0 #37
Workflow file for this run
This file contains 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: PyPi Publish | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff mypy | |
- name: Type Check | |
run: | | |
mypy toggl_api | |
- name: Lint | |
run: | | |
ruff check toggl_api | |
test: | |
needs: lint | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 1 | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
env: | |
TOGGL_WORKSPACE_ID: ${{ secrets.TOGGL_WORKSPACE_ID }} | |
TOGGL_API_TOKEN: ${{ secrets.TOGGL_API_TOKEN }} | |
GH_ACTION: "ACTION" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry tox-gh-actions tox ruff mypy | |
- name: Run tests | |
run: tox | |
- name: Upload coverage reports to Codecov | |
if: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }} | |
uses: codecov/[email protected] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
build: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.ref_type == 'tag' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff mypy | |
- name: Generate Stubs | |
run: stubgen toggl_api/ | |
- name: Build and publish to pypi | |
uses: JRubics/[email protected] | |
with: | |
pypi_token: ${{ secrets.PYPI_TOKEN }} | |
poetry_install_options: "--without=dev,docs" |