fix: workflow

This commit is contained in:
PeriniM 2025-01-02 18:38:47 +01:00
parent fce988687b
commit abe29457f2

View File

@ -14,44 +14,44 @@ jobs:
run: | run: |
sudo apt update sudo apt update
sudo apt install -y git sudo apt install -y git
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install uv - name: Install uv
uses: astral-sh/setup-uv@v3 uses: astral-sh/setup-uv@v3
- name: Install Node Env - name: Install Node Env
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
- name: Checkout - name: Checkout
uses: actions/checkout@v4.1.1 uses: actions/checkout@v4.1.1
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: Create Virtual Environment
- name: Build and validate package
run: | run: |
uv venv uv venv
- name: Activate Virtual Environment and Install Dependencies . .venv/bin/activate
run: |
source .venv/bin/activate # For Linux/macOS. Use .venv\Scripts\activate for Windows
uv sync --frozen
uv pip install --upgrade setuptools wheel hatchling twine uv pip install --upgrade setuptools wheel hatchling twine
- name: Build app uv sync --frozen
run: | uv pip install -e .
source .venv/bin/activate # Activate the virtual environment again if needed
uv build uv build
id: build_cache
if: success()
- name: Validate Metadata
run: |
source .venv/bin/activate
uv run twine check dist/* uv run twine check dist/*
- name: Debug Dist Directory - name: Debug Dist Directory
run: | run: ls -al dist
ls -al dist
- name: Cache build - name: Cache build
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ./dist path: ./dist
key: ${{ runner.os }}-build-${{ github.sha }} key: ${{ runner.os }}-build-${{ github.sha }}
if: steps.build_cache.outputs.id != ''
release: release:
name: Release name: Release
@ -73,9 +73,13 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: Restore Virtual Environment
run: | - name: Restore build artifacts
source .venv/bin/activate uses: actions/cache@v3
with:
path: ./dist
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Semantic Release - name: Semantic Release
uses: cycjimmy/semantic-release-action@v4.1.0 uses: cycjimmy/semantic-release-action@v4.1.0
with: with: