45 lines
1.2 KiB
YAML
45 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 and Python
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/0.12.13/install.sh |
|
|
env UV_INSTALL_DIR="$HOME/.local/bin" UV_NO_MODIFY_PATH=1 sh
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
"$HOME/.local/bin/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/*
|