Some checks failed
Security Scan / dependency-check (pull_request) Successful in 42s
Security Scan / security (pull_request) Successful in 47s
Test Suite / lint (pull_request) Successful in 31s
Test Suite / test (3.11) (pull_request) Successful in 1m30s
Test Suite / build (pull_request) Failing after 36s
92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Release version (e.g., v1.0.0)'
|
|
required: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v3
|
|
with:
|
|
version: "latest"
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.11
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --extra test
|
|
|
|
- name: Run full test suite
|
|
run: uv run pytest tests/ -v --cov=src/embeddingbuddy --cov-report=term-missing
|
|
|
|
build-and-release:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v3
|
|
with:
|
|
version: "latest"
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.11
|
|
|
|
- name: Install dependencies
|
|
run: uv sync
|
|
|
|
- name: Build package
|
|
run: uv build
|
|
|
|
- name: Create release notes
|
|
run: |
|
|
echo "# Release Notes" > release-notes.md
|
|
echo "" >> release-notes.md
|
|
echo "## What's New" >> release-notes.md
|
|
echo "" >> release-notes.md
|
|
echo "- Modular architecture with improved testability" >> release-notes.md
|
|
echo "- Comprehensive test suite" >> release-notes.md
|
|
echo "- Enhanced documentation" >> release-notes.md
|
|
echo "- Security scanning and dependency management" >> release-notes.md
|
|
echo "" >> release-notes.md
|
|
echo "## Installation" >> release-notes.md
|
|
echo "" >> release-notes.md
|
|
echo '```bash' >> release-notes.md
|
|
echo 'uv sync' >> release-notes.md
|
|
echo 'uv run python main.py' >> release-notes.md
|
|
echo '```' >> release-notes.md
|
|
|
|
- name: Create Release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref_name || github.event.inputs.version }}
|
|
release_name: Release ${{ github.ref_name || github.event.inputs.version }}
|
|
body_path: release-notes.md
|
|
draft: false
|
|
prerelease: false
|
|
|
|
- name: Upload Release Assets
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: dist/
|
|
asset_name: embeddingbuddy-dist
|
|
asset_content_type: application/zip |