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
65 changes: 65 additions & 0 deletions .github/workflows/release-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release macOS Desktop

on:
workflow_dispatch:
inputs:
release_tag:
description: GitHub Release tag to upload assets to
required: true
default: v4.0.0
upload_assets:
description: Upload generated DMG files to the release
required: true
type: boolean
default: true

permissions:
contents: write

jobs:
build-macos:
name: macOS ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- arch: x64
os: macos-13
- arch: arm64
os: macos-14

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install root dependencies
run: npm ci
env:
npm_config_arch: ${{ matrix.arch }}

- name: Build macOS desktop package
run: npm run release:desktop:mac -- --arch=${{ matrix.arch }}
env:
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
npm_config_arch: ${{ matrix.arch }}

- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: 1Shell-mac-${{ matrix.arch }}
path: release/desktop-mac/1Shell-v*-mac-${{ matrix.arch }}.dmg
if-no-files-found: error

- name: Upload to GitHub Release
if: ${{ inputs.upload_assets }}
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.release_tag }}
run: gh release upload "$RELEASE_TAG" release/desktop-mac/1Shell-v*-mac-${{ matrix.arch }}.dmg --repo "$GITHUB_REPOSITORY" --clobber
14 changes: 14 additions & 0 deletions desktop-start.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off
chcp 65001 >nul 2>&1
setlocal
cd /d "%~dp0"
title 1Shell Desktop

if exist "%~dp0node\npm.cmd" (
set "NPM_CMD=%~dp0node\npm.cmd"
) else (
set "NPM_CMD=npm"
)

"%NPM_CMD%" run desktop:dev
if errorlevel 1 pause
Binary file added electron/icon.ico
Binary file not shown.
Loading
Loading