Skip to content
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
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,3 @@ jobs:
- name: Build application
run: npm run build

- name: Package application (Linux AppImage)
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
run: npm run package -- --linux AppImage --dir

# Optional: Upload build artifacts (e.g., the AppImage)
# - name: Upload Linux Build Artifact
# uses: actions/upload-artifact@v3
# with:
# name: switchbot-client-linux-appimage
# path: release/*.AppImage # Adjust path as needed
# if-no-files-found: error # Optional: fail if no file is found
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build & Release

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+" # e.g. 1.2.0

permissions:
contents: write # needed to create GitHub Releases

jobs:
release:
strategy:
matrix:
include:
- os: windows-latest
platform: win
- os: macos-latest
platform: mac

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Build application
run: npm run build

- name: Package & publish to GitHub Releases
run: npx electron-builder --${{ matrix.platform }} --publish always
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading