Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one draft release that all workflows upload to #43

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 24 additions & 25 deletions .github/workflows/linux-aarch64-nightly.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 }}
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
49 changes: 25 additions & 24 deletions .github/workflows/linux-x86_64-nightly.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 }}
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
49 changes: 25 additions & 24 deletions .github/workflows/macos-nightly.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 }}
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
22 changes: 20 additions & 2 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
token: ${{ secrets.PAT_TOKEN }}
inputs: '{"release_upload_url": "${{ steps.create_release.outputs.upload_url }}"}'
30 changes: 14 additions & 16 deletions .github/workflows/windows-nightly.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 }}
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