mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-01 21:00:48 +08:00
fix: workflow
This commit is contained in:
parent
fce988687b
commit
abe29457f2
42
.github/workflows/release.yml
vendored
42
.github/workflows/release.yml
vendored
@ -14,44 +14,44 @@ jobs:
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y git
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v3
|
||||
|
||||
- name: Install Node Env
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Create Virtual Environment
|
||||
|
||||
- name: Build and validate package
|
||||
run: |
|
||||
uv venv
|
||||
- name: Activate Virtual Environment and Install Dependencies
|
||||
run: |
|
||||
source .venv/bin/activate # For Linux/macOS. Use .venv\Scripts\activate for Windows
|
||||
uv sync --frozen
|
||||
. .venv/bin/activate
|
||||
uv pip install --upgrade setuptools wheel hatchling twine
|
||||
- name: Build app
|
||||
run: |
|
||||
source .venv/bin/activate # Activate the virtual environment again if needed
|
||||
uv sync --frozen
|
||||
uv pip install -e .
|
||||
uv build
|
||||
id: build_cache
|
||||
if: success()
|
||||
- name: Validate Metadata
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
uv run twine check dist/*
|
||||
|
||||
- name: Debug Dist Directory
|
||||
run: |
|
||||
ls -al dist
|
||||
run: ls -al dist
|
||||
|
||||
- name: Cache build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./dist
|
||||
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||
if: steps.build_cache.outputs.id != ''
|
||||
|
||||
release:
|
||||
name: Release
|
||||
@ -73,9 +73,13 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Restore Virtual Environment
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./dist
|
||||
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||
|
||||
- name: Semantic Release
|
||||
uses: cycjimmy/semantic-release-action@v4.1.0
|
||||
with:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user