Files
micro-agents/.gitea/workflows/publish.yml
Azimkin fa27a569b8
All checks were successful
Test and publish / publish (push) Successful in 7s
Install uv without JavaScript action
2026-09-13 23:46:10 +02:00

52 lines
1.6 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
env:
UV_ARCHIVE_SHA256: 745765a3b6e360ad76743599ae5c42e9278c7edf8bbff9fc76d05bf2623a04dd
run: |
mkdir -p "$HOME/.local/bin"
curl -4 --fail --location --show-error --silent \
--retry 5 --retry-all-errors --connect-timeout 30 \
--output /tmp/uv.tar.gz \
https://github.com/astral-sh/uv/releases/download/0.12.13/uv-x86_64-unknown-linux-gnu.tar.gz
echo "$UV_ARCHIVE_SHA256 /tmp/uv.tar.gz" | sha256sum --check -
tar -xzf /tmp/uv.tar.gz --strip-components=1 -C "$HOME/.local/bin"
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/*