50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: Test and publish
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
|
with:
|
|
version: "0.12.13"
|
|
python-version: "3.12"
|
|
enable-cache: false
|
|
download-from-astral-mirror: false
|
|
github-token: ""
|
|
|
|
- name: Install Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Install workspace
|
|
run: uv sync --all-packages
|
|
|
|
- name: Run core tests
|
|
run: uv run python -m unittest discover -s tests
|
|
|
|
- name: Run tools tests
|
|
run: uv run python -m unittest discover -s packages/micro-agents-tools/tests
|
|
|
|
- name: Build distributions
|
|
run: |
|
|
uv build --no-sources
|
|
uv build --package micro-agents-tools --no-sources
|
|
|
|
- name: Publish to Gitea PyPI registry
|
|
env:
|
|
TWINE_USERNAME: Azimkin
|
|
TWINE_PASSWORD: ${{ secrets.PACKAGE_TOKEN }}
|
|
run: >-
|
|
uvx --from twine twine upload
|
|
--repository-url https://git.azimkin.dev/api/packages/Azimkin/pypi
|
|
dist/*
|