Skip to content

Commit

Permalink
Merge pull request #45 from Abdenasser/enhance-workflows-2
Browse files Browse the repository at this point in the history
fixing asset_path for platform workflows
  • Loading branch information
Abdenasser authored Nov 8, 2024
2 parents d06492c + 9c1b374 commit cf91ed8
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/linux-aarch64-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,19 @@ jobs:
run: |
echo "Building AppImage for aarch64..."
npm run tauri build -- --target aarch64-unknown-linux-gnu --bundles appimage
cd src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/
for f in *.AppImage; do
echo "AARCH64_APPIMAGE_PATH=src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/$f" >> $GITHUB_ENV
done
- name: Build Debian Package
run: |
echo "Building Debian package for aarch64..."
npm run tauri build -- --target aarch64-unknown-linux-gnu --bundles deb
cd src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/
for f in *.deb; do
echo "AARCH64_DEB_PATH=src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/$f" >> $GITHUB_ENV
done
- name: Get version from package.json
id: version
Expand All @@ -139,7 +147,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage
asset_path: ${{ env.AARCH64_APPIMAGE_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_aarch64.AppImage
asset_content_type: application/x-executable

Expand All @@ -150,6 +158,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb
asset_path: ${{ env.AARCH64_DEB_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_aarch64.deb
asset_content_type: application/vnd.debian.binary-package
16 changes: 12 additions & 4 deletions .github/workflows/linux-x86_64-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,20 @@ jobs:
run: |
echo "Building AppImage for x86_64..."
npm run tauri build -- --target x86_64-unknown-linux-gnu --bundles appimage
cd src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/
for f in *.AppImage; do
echo "APPIMAGE_PATH=src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/$f" >> $GITHUB_ENV
done
- name: Build Debian Package (x86_64)
run: |
echo "Building Debian package for x86_64..."
npm run tauri build -- --target x86_64-unknown-linux-gnu --bundles deb
cd src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/
for f in *.deb; do
echo "DEB_PATH=src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/$f" >> $GITHUB_ENV
done
- name: Get version from package.json
id: version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
Expand All @@ -69,7 +77,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage
asset_path: ${{ env.APPIMAGE_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_x86_64.AppImage
asset_content_type: application/x-executable

Expand All @@ -80,6 +88,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb
asset_path: ${{ env.DEB_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_x86_64.deb
asset_content_type: application/vnd.debian.binary-package
18 changes: 12 additions & 6 deletions .github/workflows/macos-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ jobs:
run: |
echo "Building for Intel Mac..."
npm run tauri build -- --target x86_64-apple-darwin --bundles dmg
# Rename the Intel build
# Rename the Intel build and store the filename
cd src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/
for f in *.dmg; do mv "$f" "intel-$f"; done
for f in *.dmg; do
mv "$f" "intel-$f"
echo "INTEL_DMG_PATH=src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/intel-$f" >> $GITHUB_ENV
done
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
Expand All @@ -64,9 +67,12 @@ jobs:
run: |
echo "Building for aarch64..."
npm run tauri build -- --target aarch64-apple-darwin --bundles dmg
# Rename the Apple Silicon build
# Rename the Apple Silicon build and store the filename
cd src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/
for f in *.dmg; do mv "$f" "silicon-$f"; done
for f in *.dmg; do
mv "$f" "silicon-$f"
echo "SILICON_DMG_PATH=src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/silicon-$f" >> $GITHUB_ENV
done
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
Expand All @@ -83,7 +89,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/intel-*.dmg
asset_path: ${{ env.INTEL_DMG_PATH }}
asset_name: intel-NeoHtop_${{ steps.version.outputs.version }}_x64.dmg
asset_content_type: application/x-apple-diskimage

Expand All @@ -94,6 +100,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/silicon-*.dmg
asset_path: ${{ env.SILICON_DMG_PATH }}
asset_name: silicon-NeoHtop_${{ steps.version.outputs.version }}_aarch64.dmg
asset_content_type: application/x-apple-diskimage
3 changes: 2 additions & 1 deletion .github/workflows/windows-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
run: |
echo "Building Windows executable..."
npm run tauri build
echo "WIN_EXE_PATH=src-tauri/target/release/NeoHtop.exe" >> $GITHUB_ENV
- name: Get version from package.json
id: version
Expand All @@ -57,6 +58,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ github.event.inputs.release_upload_url }}
asset_path: src-tauri/target/release/NeoHtop.exe
asset_path: ${{ env.WIN_EXE_PATH }}
asset_name: NeoHtop_${{ steps.version.outputs.version }}_x64.exe
asset_content_type: application/vnd.microsoft.portable-executable

0 comments on commit cf91ed8

Please sign in to comment.