Skip to content

Commit

Permalink
Update release methods
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Best-Codes committed Nov 22, 2024
1 parent 2b2b49e commit 98ac33f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chatter",
"version": "0.0.0-beta.1",
"version": "0.0.0-beta.2",
"module": "index.ts",
"type": "module",
"packageManager": "[email protected]",
Expand Down

0 comments on commit 98ac33f

Please sign in to comment.