Update .gitea/workflows/release.yml
This commit is contained in:
@@ -25,15 +25,26 @@ jobs:
|
|||||||
ruff check . --fix
|
ruff check . --fix
|
||||||
pytest -q
|
pytest -q
|
||||||
|
|
||||||
- name: Build zip
|
- name: Build SDSAT tar.gz
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist buildtmp/{bin,logs,update}
|
||||||
zip -r "dist/SDSAT-${{ gitea.ref_name }}.zip" scripts pyproject.toml || true
|
|
||||||
|
|
||||||
# Si requirements.txt existe, on le met aussi
|
# Copie scripts
|
||||||
if [ -f requirements.txt ]; then
|
cp -r scripts buildtmp/bin/
|
||||||
zip -ur "dist/SDSAT-${{ gitea.ref_name }}.zip" requirements.txt
|
|
||||||
fi
|
# 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)
|
- name: Create release + upload asset (Gitea API)
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user