From 98ac33f8db93cb697033e34af7510cdff0082e68 Mon Sep 17 00:00:00 2001 From: The-Best-Codes Date: Fri, 22 Nov 2024 11:45:41 -0600 Subject: [PATCH] Update release methods --- .github/workflows/release.yml | 16 +++++++++++++--- package.json | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da6d3a5..fb50333 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,16 +27,26 @@ jobs: - name: Create archives run: | cd dist + # Create archives for Linux builds (both .tar.xz and .zip) + for dir in linux-*; do + if [ -d "$dir" ]; then + tar -cJf "$dir.tar.xz" "$dir" # -J flag creates xz compression + zip -r "$dir.zip" "$dir" + fi + done + + # Create only zip archives for other platforms for dir in */; do dir=${dir%/} - tar -czf "$dir.tar.gz" "$dir" - zip -r "$dir.zip" "$dir" + if [[ ! "$dir" == linux-* ]] && [ -d "$dir" ]; then + zip -r "$dir.zip" "$dir" + fi done - name: Upload Release Assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - for file in dist/*.{tar.gz,zip}; do + for file in dist/*.{tar.xz,zip}; do gh release upload ${{ github.event.release.tag_name }} "$file" --clobber done diff --git a/package.json b/package.json index 623f8d3..ab0e453 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chatter", - "version": "0.0.0-beta.1", + "version": "0.0.0-beta.2", "module": "index.ts", "type": "module", "packageManager": "bun@1.1.36",