Fix CI: platform-specific Python setup and artifact actions v3 for Gitea
- Use actions/setup-python only on Linux (container); macOS/Windows create a venv from pre-installed python3.12 to avoid privileged install failures - Downgrade upload/download-artifact to v3 (v4 uses an API Gitea doesn't support) - Remove merge-multiple (v4-only option) from download-artifact - Change release files glob to artifacts/**/* (v3 nests each artifact in a subdir) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,11 +31,26 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python 3.12
|
- name: Set up Python 3.12 (Linux)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
|
|
||||||
|
- name: Set up Python venv (macOS)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
PYBIN="$(command -v python3.12 || echo /opt/homebrew/bin/python3.12)"
|
||||||
|
"$PYBIN" -m venv .venv
|
||||||
|
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
- name: Set up Python venv (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
py -3.12 -m venv .venv
|
||||||
|
Add-Content -Path $env:GITHUB_PATH -Value "$env:GITHUB_WORKSPACE\.venv\Scripts"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r requirements-dev.txt
|
run: pip install -r requirements-dev.txt
|
||||||
|
|
||||||
@@ -75,7 +90,7 @@ jobs:
|
|||||||
# ── Upload artifact for the release job ──────────────────────────────
|
# ── Upload artifact for the release job ──────────────────────────────
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact }}
|
name: ${{ matrix.artifact }}
|
||||||
path: ${{ matrix.artifact }}
|
path: ${{ matrix.artifact }}
|
||||||
@@ -93,10 +108,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
@@ -105,7 +119,7 @@ jobs:
|
|||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
files: artifacts/*
|
files: artifacts/**/*
|
||||||
body: |
|
body: |
|
||||||
## Better Claude Config ${{ github.ref_name }}
|
## Better Claude Config ${{ github.ref_name }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user