Skip to content

Sho/robust monorepo discovery #2

Sho/robust monorepo discovery

Sho/robust monorepo discovery #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
smoke:
name: Smoke test / python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install .
- run: nimp check status
build-package:
name: "Build and package"
if: ${{ github.event_name == 'push' }}
needs:
- ruff
- smoke
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/nimp-cli
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
with:
# for git-versionning
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- name: Install package utils
run: python3 -m pip install build twine
- name: Build dist
run: python3 -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1