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