ci: repackage for public github release

This commit is contained in:
Paweł Lidwin 2026-06-03 19:16:34 +02:00
parent 0da024ef14
commit ce2bd87261
No known key found for this signature in database
GPG key ID: C6EDF064F9FEE1E1

View file

@ -106,7 +106,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
if: startsWith(github.ref, 'refs/tags/')
if: github.ref_type == 'tag'
env:
UV_SYSTEM_PYTHON: 1
steps:
@ -130,10 +130,39 @@ jobs:
permissions:
contents: write
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
if: github.ref_type == 'tag'
needs: [pyinstaller, zipapp, pypi]
steps:
- name: Download builds
uses: actions/download-artifact@v8
- name: Setup distribution dir
run: mkdir dist
- name: Copy binaries
run: |
oses=("Linux" "macOS" "Windows")
arches=("X64" "ARM64")
for os in ${oses[@]}; do
for arch in ${arches[@]}; do
file="./$os-$arch-package/legendary"*
if [ -f $file ]; then
filename=$(basename $file)
name="${filename%%.*}"
ext=${filename#*.}
if [[ "$ext" == "$filename" ]]; then
ext=""
else
ext=".$ext"
fi
cp $file "./dist/legendary_${os,}_${arch,,}$ext"
fi
done
done
- uses: softprops/action-gh-release@v3
with:
draft: true
generate_release_notes: true
files: release/legendary*