Update .gitea/workflows/release.yml
This commit is contained in:
@@ -25,15 +25,26 @@ jobs:
|
||||
ruff check . --fix
|
||||
pytest -q
|
||||
|
||||
- name: Build zip
|
||||
- name: Build SDSAT tar.gz
|
||||
run: |
|
||||
mkdir -p dist
|
||||
zip -r "dist/SDSAT-${{ gitea.ref_name }}.zip" scripts pyproject.toml || true
|
||||
mkdir -p dist buildtmp/{bin,logs,update}
|
||||
|
||||
# Si requirements.txt existe, on le met aussi
|
||||
if [ -f requirements.txt ]; then
|
||||
zip -ur "dist/SDSAT-${{ gitea.ref_name }}.zip" requirements.txt
|
||||
fi
|
||||
# Copie scripts
|
||||
cp -r scripts buildtmp/bin/
|
||||
|
||||
# Supprime tous les __init__.py
|
||||
find buildtmp/scripts/bin -name "__init__.py" -delete
|
||||
|
||||
# Génère le fichier de metadata
|
||||
cat > buildtmp/BUILD_INFO.txt <<EOF
|
||||
REPO=${{ gitea.event.repository.name }}
|
||||
TAG=${{ gitea.ref_name }}
|
||||
COMMIT=${{ gitea.sha }}
|
||||
BUILT_AT=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
EOF
|
||||
|
||||
# Création du tar.gz
|
||||
tar -czf "dist/SDSAT-${{ gitea.ref_name }}.tar.gz" -C buildtmp .
|
||||
|
||||
- name: Create release + upload asset (Gitea API)
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user