diff --git a/.github/workflows/linux-aarch64-nightly.yml b/.github/workflows/linux-aarch64-nightly.yml index 2f9ece4..5e52e40 100644 --- a/.github/workflows/linux-aarch64-nightly.yml +++ b/.github/workflows/linux-aarch64-nightly.yml @@ -1,9 +1,11 @@ name: Linux (aarch64) Nightly Build on: - workflow_dispatch: # Allows manual triggering - schedule: - - cron: '0 0 * * *' # Run daily at midnight UTC + workflow_dispatch: + inputs: + release_upload_url: + description: 'Release upload URL' + required: true env: CARGO_TERM_COLOR: always @@ -126,31 +128,28 @@ jobs: echo "Building Debian package for aarch64..." npm run tauri build -- --target aarch64-unknown-linux-gnu --bundles deb - - name: Upload AppImage - uses: actions/upload-artifact@v4 - with: - name: linux-appimage-aarch64 - path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage - - - name: Upload Debian Package - uses: actions/upload-artifact@v4 - with: - name: linux-deb-aarch64 - path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb - - name: Get version from package.json id: version run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - - name: Create Release - if: github.event_name == 'workflow_dispatch' - uses: softprops/action-gh-release@v1 + - name: Upload AppImage to Release + if: github.event.inputs.release_upload_url != '' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} with: - name: "Linux ARM64 Nightly Build v${{ steps.version.outputs.version }}" - tag_name: "linux-arm64-nightly-${{ steps.version.outputs.version }}" - files: | - src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage - src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb - prerelease: false + upload_url: ${{ github.event.inputs.release_upload_url }} + asset_path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage + asset_name: NeoHtop_${{ steps.version.outputs.version }}_aarch64.AppImage + asset_content_type: application/x-executable + + - name: Upload Debian Package to Release + if: github.event.inputs.release_upload_url != '' + uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file + 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_name: NeoHtop_${{ steps.version.outputs.version }}_aarch64.deb + asset_content_type: application/vnd.debian.binary-package \ No newline at end of file diff --git a/.github/workflows/linux-x86_64-nightly.yml b/.github/workflows/linux-x86_64-nightly.yml index bf75a96..8fca9fd 100644 --- a/.github/workflows/linux-x86_64-nightly.yml +++ b/.github/workflows/linux-x86_64-nightly.yml @@ -1,7 +1,11 @@ name: Linux (x86_64) Nightly Build on: - workflow_dispatch: # Allows manual triggering + workflow_dispatch: + inputs: + release_upload_url: + description: 'Release upload URL' + required: true env: CARGO_TERM_COLOR: always @@ -54,31 +58,28 @@ jobs: echo "Building Debian package for x86_64..." npm run tauri build -- --target x86_64-unknown-linux-gnu --bundles deb - - name: Upload AppImage - uses: actions/upload-artifact@v4 - with: - name: linux-appimage - path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage - - - name: Upload Debian Package - uses: actions/upload-artifact@v4 - with: - name: linux-deb - path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb - - name: Get version from package.json id: version run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - - - name: Create Release - if: github.event_name == 'workflow_dispatch' - uses: softprops/action-gh-release@v1 + + - name: Upload AppImage to Release + if: github.event.inputs.release_upload_url != '' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} with: - name: "Linux x86_64 Nightly Build v${{ steps.version.outputs.version }}" - tag_name: "linux-x86_64-nightly-${{ steps.version.outputs.version }}" - files: | - src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage - src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb - prerelease: false + upload_url: ${{ github.event.inputs.release_upload_url }} + asset_path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage + asset_name: NeoHtop_${{ steps.version.outputs.version }}_x86_64.AppImage + asset_content_type: application/x-executable + + - name: Upload Debian Package to Release + if: github.event.inputs.release_upload_url != '' + uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file + 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_name: NeoHtop_${{ steps.version.outputs.version }}_x86_64.deb + asset_content_type: application/vnd.debian.binary-package \ No newline at end of file diff --git a/.github/workflows/macos-nightly.yml b/.github/workflows/macos-nightly.yml index bd3416f..bbe5dd8 100644 --- a/.github/workflows/macos-nightly.yml +++ b/.github/workflows/macos-nightly.yml @@ -1,7 +1,11 @@ name: MacOS (Intel/Apple Silicon) Nightly Build on: - workflow_dispatch: # Allows manual triggering + workflow_dispatch: + inputs: + release_upload_url: + description: 'Release upload URL' + required: true env: CARGO_TERM_COLOR: always @@ -68,31 +72,28 @@ jobs: APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - - name: Upload Intel Build - uses: actions/upload-artifact@v4 - with: - name: macos-intel-build - path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg - - - name: Upload Apple Silicon Build - uses: actions/upload-artifact@v4 - with: - name: macos-apple-silicon-build - path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg - - name: Get version from package.json id: version run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - - - name: Create Release - if: github.event_name == 'workflow_dispatch' - uses: softprops/action-gh-release@v1 + + - name: Upload Intel Build to Release + if: github.event.inputs.release_upload_url != '' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} with: - name: "MacOS Nightly Build v${{ steps.version.outputs.version }}" - tag_name: "macos-nightly-${{ steps.version.outputs.version }}" - files: | - src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg - src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg - prerelease: false + upload_url: ${{ github.event.inputs.release_upload_url }} + asset_path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/intel-*.dmg + asset_name: intel-NeoHtop_${{ steps.version.outputs.version }}_x64.dmg + asset_content_type: application/x-apple-diskimage + + - name: Upload Silicon Build to Release + if: github.event.inputs.release_upload_url != '' + uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file + 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_name: silicon-NeoHtop_${{ steps.version.outputs.version }}_aarch64.dmg + asset_content_type: application/x-apple-diskimage \ No newline at end of file diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index c423f48..2d43aa3 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -4,31 +4,49 @@ on: workflow_dispatch: # Manual trigger jobs: - trigger-builds: + create-draft: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Get version from package.json + id: version + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Create Draft Release + id: create_release + uses: softprops/action-gh-release@v1 + with: + name: "NeoHtop v${{ steps.version.outputs.version }}" + tag_name: "v${{ steps.version.outputs.version }}" + draft: true + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + - name: Trigger MacOS Build uses: benc-uk/workflow-dispatch@v1 with: workflow: macos-nightly.yml token: ${{ secrets.PAT_TOKEN }} + inputs: '{"release_upload_url": "${{ steps.create_release.outputs.upload_url }}"}' - name: Trigger Windows Build uses: benc-uk/workflow-dispatch@v1 with: workflow: windows-nightly.yml token: ${{ secrets.PAT_TOKEN }} + inputs: '{"release_upload_url": "${{ steps.create_release.outputs.upload_url }}"}' - name: Trigger Linux x86_64 Build uses: benc-uk/workflow-dispatch@v1 with: workflow: linux-x86_64-nightly.yml token: ${{ secrets.PAT_TOKEN }} + inputs: '{"release_upload_url": "${{ steps.create_release.outputs.upload_url }}"}' - name: Trigger Linux ARM64 Build uses: benc-uk/workflow-dispatch@v1 with: workflow: linux-aarch64-nightly.yml - token: ${{ secrets.PAT_TOKEN }} \ No newline at end of file + token: ${{ secrets.PAT_TOKEN }} + inputs: '{"release_upload_url": "${{ steps.create_release.outputs.upload_url }}"}' \ No newline at end of file diff --git a/.github/workflows/windows-nightly.yml b/.github/workflows/windows-nightly.yml index e950ad5..577f4d1 100644 --- a/.github/workflows/windows-nightly.yml +++ b/.github/workflows/windows-nightly.yml @@ -1,7 +1,11 @@ name: Windows (x86_64) Nightly Build on: - workflow_dispatch: # Allows manual triggering + workflow_dispatch: + inputs: + release_upload_url: + description: 'Release upload URL' + required: true env: CARGO_TERM_COLOR: always @@ -41,24 +45,18 @@ jobs: echo "Building Windows executable..." npm run tauri build - - name: Upload Executable - uses: actions/upload-artifact@v4 - with: - name: windows-exe - path: src-tauri/target/release/*.exe - - name: Get version from package.json id: version shell: bash # Force using bash shell run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - - name: Create Release - if: github.event_name == 'workflow_dispatch' - uses: softprops/action-gh-release@v1 - with: - name: "Windows Nightly Build v${{ steps.version.outputs.version }}" - tag_name: "windows-nightly-${{ steps.version.outputs.version }}" - files: src-tauri/target/release/*.exe - prerelease: false + - name: Upload to Release + if: github.event.inputs.release_upload_url != '' + uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + with: + upload_url: ${{ github.event.inputs.release_upload_url }} + asset_path: src-tauri/target/release/NeoHtop.exe + asset_name: NeoHtop_${{ steps.version.outputs.version }}_x64.exe + asset_content_type: application/vnd.microsoft.portable-executable \ No newline at end of file