Skip to content

PyPi Publish

PyPi Publish #41

Workflow file for this run

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"
release:
needs: test
uses: ddkasa/toggl-api-wrapper/.github/workflows/release.yaml@main

Check failure on line 99 in .github/workflows/publish.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yaml

Invalid workflow file

error parsing called workflow ".github/workflows/publish.yaml" -> "ddkasa/toggl-api-wrapper/.github/workflows/release.yaml@main" (source branch with sha:7df7a7ec0f4ec8ee2b87804206c03e1aca58786b) : workflow is not reusable as it is missing a `on.workflow_call` trigger
documentation:
needs: test
uses: ddkasa/toggl-api-wrapper/.github/workflows/documentation.yaml@main