Skip to content

Commit

Permalink
[FEAT]: Build Linux Binary Tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
itsnotsos authored Jan 1, 2025
1 parent 511e0da commit 367997d
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/linux-aarch64-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,16 @@ jobs:
for f in *.rpm; do
echo "AARCH64_RPM_PATH=src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/rpm/$f" >> $GITHUB_ENV
done
- name: Build Tarball (aarch64)
run: |
echo "Building tar.gz for aarch64..."
mkdir -p dist/aarch64
cp src-tauri/target/aarch64-unknown-linux-gnu/release/<binary_name> dist/aarch64/
cp README.md LICENSE dist/aarch64/
tar -czvf NeoHtop_${{ steps.version.outputs.version }}_aarch64.tar.gz -C dist/aarch64 .
echo "TAR_GZ_PATH=NeoHtop_${{ steps.version.outputs.version }}_aarch64.tar.gz" >> $GITHUB_ENV
- name: Get version from package.json
id: version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -180,4 +189,15 @@ jobs:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: ${{ env.AARCH64_RPM_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_aarch64.rpm
asset_content_type: application/x-rpm
asset_content_type: application/x-rpm

- name: Upload Tarball to Release
if: github.event.inputs.release_upload_url != ''
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: ${{ env.TAR_GZ_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_aarch64.tar.gz
asset_content_type: application/gzip
21 changes: 21 additions & 0 deletions .github/workflows/linux-x86_64-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ jobs:
echo "RPM_PATH=src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/rpm/$f" >> $GITHUB_ENV
done
- name: Build Tarball (x86_64)
run: |
echo "Building tar.gz for x86_64..."
npm run tauri build -- --target x86_64-unknown-linux-gnu
mkdir -p tarball/x86_64
cp src-tauri/target/x86_64-unknown-linux-gnu/release/NeoHtop ./tarball/x86_64/ # Adjust binary path and name
cp README.md LICENSE ./tarball/x86_64/ # Include any additional files
tar -czvf NeoHtop_${{ steps.version.outputs.version }}_x86_64.tar.gz -C tarball x86_64/
echo "TARBALL_PATH=NeoHtop_${{ steps.version.outputs.version }}_x86_64.tar.gz" >> $GITHUB_ENV
- name: Get version from package.json
id: version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -111,3 +121,14 @@ jobs:
asset_path: ${{ env.RPM_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_x86_64.rpm
asset_content_type: application/x-rpm

- name: Upload Tarball to Release
if: github.event.inputs.release_upload_url != ''
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: ${{ env.TARBALL_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_x86_64.tar.gz
asset_content_type: application/gzip

0 comments on commit 367997d

Please sign in to comment.