Skip to content

init project

init project #1

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
tags: ["v*"]
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Set Up uv
uses: astral-sh/setup-uv@v5
- name: Sync
run: uv sync --locked
- name: Run Tests
run: uv run pytest tests -v
- name: Build Distributions
run: uv build
publish:
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
name: Publish to PyPI
needs: test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/ctxd/
permissions:
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Set Up uv
uses: astral-sh/setup-uv@v5
- name: Sync
run: uv sync --locked
- name: Build Distributions
run: uv build
- name: Publish Distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1