Skip to content

Update release.yml

Update release.yml #25

Workflow file for this run

name: Release
on:
push:
branches: ["dev"]
paths:
- "src/**"
- "tests/**"
- "pyproject.toml"
- "uv.lock"
- "Dockerfile"
- ".github/**"
jobs:
check:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.13"
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Run ruff
run: uv run ruff check .
- name: Run mypy
run: uv run mypy .
test:
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.13"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Run tests
run: uv run pytest .
release:
runs-on: ubuntu-24.04
needs:
- check
- security

Check failure on line 64 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 64, Col: 9): Job 'release' depends on unknown job 'security'. .github/workflows/release.yml (Line: 84, Col: 12): Job 'docker' depends on job 'release' which creates a cycle in the dependency graph.
- test
concurrency: release
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Python Semantic Release
id: release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
docker:
runs-on: ubuntu-24.04
needs: release
if: needs.release.outputs.released == 'true'
steps:
- uses: actions/checkout@v4
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: |
antonk0/gigachat-adapter:latest
antonk0/gigachat-adapter:${{ needs.release.outputs.version }}