From ce2bd87261b389c27fb8de89a5e6e27b4b31dbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lidwin?= Date: Wed, 3 Jun 2026 19:16:34 +0200 Subject: [PATCH] ci: repackage for public github release --- .github/workflows/python.yml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6964142..3ecd1fb 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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* \ No newline at end of file