Only package exes for one entry in matrix

This commit is contained in:
Thomas Krijnen
2024-11-22 12:18:40 +01:00
parent 71637f120a
commit 8420823342
+9 -5
View File
@@ -88,6 +88,11 @@ jobs:
run: | run: |
$VERSION = 'v' + ((Get-Content VERSION).Trim()) $VERSION = 'v' + ((Get-Content VERSION).Trim())
$SHA = ${env:GITHUB_SHA}.Substring(0, 7) $SHA = ${env:GITHUB_SHA}.Substring(0, 7)
$OUTPUT_DIR = "$env:USERPROFILE\output"
New-Item -ItemType Directory -Force -Path $OUTPUT_DIR
if (${{ matrix.python }} -eq '3.9.11') {
# only for the first python version the executables are assembled for upload
cd _installed-vs2019-x64/bin cd _installed-vs2019-x64/bin
Get-ChildItem -Path . | ForEach-Object { Get-ChildItem -Path . | ForEach-Object {
echo $_ echo $_
@@ -96,16 +101,15 @@ jobs:
$zipName = "${baseName}-$VERSION-$SHA-win64.zip" $zipName = "${baseName}-$VERSION-$SHA-win64.zip"
7z a $zipName $exe 7z a $zipName $exe
} }
$OUTPUT_DIR = "$env:USERPROFILE\output"
New-Item -ItemType Directory -Force -Path $OUTPUT_DIR
mv *.zip $OUTPUT_DIR mv *.zip $OUTPUT_DIR
}
$version = "${{ matrix.python }}" $pyVersion = "${{ matrix.python }}"
$pyVersionMajor = ($version -split '\.')[0..1] -join '.' $pyVersionMajor = ($pyVersion -split '\.')[0..1] -join ''
cd C:\Python\${{ matrix.python }}\Lib\site-packages cd C:\Python\${{ matrix.python }}\Lib\site-packages
Remove-Item -Recurse -Force ifcopenshell\__pycache__ -ErrorAction SilentlyContinue Remove-Item -Recurse -Force ifcopenshell\__pycache__ -ErrorAction SilentlyContinue
Get-ChildItem -Path ifcopenshell -Filter "*.pyc" -Recurse | Remove-Item -Force Get-ChildItem -Path ifcopenshell -Filter "*.pyc" -Recurse | Remove-Item -Force
$zipName = "ifcopenshell-$pyVersionMajor-$VERSION-$SHA-win64.zip" $zipName = "ifcopenshell-python-$pyVersionMajor-$VERSION-$SHA-win64.zip"
7z a $zipName ifcopenshell 7z a $zipName ifcopenshell
mv $zipName $OUTPUT_DIR mv $zipName $OUTPUT_DIR