mirror of
https://github.com/sipeed/NanoKVM-USB.git
synced 2026-11-09 17:04:27 -06:00
chore: add macOS build configuration
This commit is contained in:
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -82,11 +82,24 @@ jobs:
|
|||||||
target: windows
|
target: windows
|
||||||
build_script: build:win
|
build_script: build:win
|
||||||
artifact_name: desktop-windows
|
artifact_name: desktop-windows
|
||||||
|
- os: macos-latest
|
||||||
|
target: macos-arm64
|
||||||
|
build_script: build:mac
|
||||||
|
build_args: --arm64
|
||||||
|
artifact_name: desktop-macos-arm64
|
||||||
|
- os: macos-latest
|
||||||
|
target: macos-x64
|
||||||
|
build_script: build:mac
|
||||||
|
build_args: --x64
|
||||||
|
artifact_name: desktop-macos-x64
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: desktop
|
working-directory: desktop
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -102,11 +115,18 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y build-essential python3 libudev-dev rpm
|
sudo apt-get install -y build-essential python3 libudev-dev rpm
|
||||||
|
|
||||||
|
- name: Import Code-Signing Certificates
|
||||||
|
if: startsWith(matrix.os, 'macos')
|
||||||
|
uses: apple-actions/import-codesign-certs@v3
|
||||||
|
with:
|
||||||
|
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Build desktop package
|
- name: Build desktop package
|
||||||
run: npm run ${{ matrix.build_script }}
|
run: npm run ${{ matrix.build_script }} ${{ matrix.build_args || '' }}
|
||||||
|
|
||||||
- name: Upload desktop artifacts
|
- name: Upload desktop artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -91,11 +91,18 @@ jobs:
|
|||||||
target: windows
|
target: windows
|
||||||
build_script: build:win-full
|
build_script: build:win-full
|
||||||
artifact_name: desktop-windows
|
artifact_name: desktop-windows
|
||||||
|
- os: macos-latest
|
||||||
|
target: macos
|
||||||
|
build_script: build:mac-full
|
||||||
|
artifact_name: desktop-macos
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: desktop
|
working-directory: desktop
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -113,6 +120,13 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y build-essential python3 libudev-dev rpm
|
sudo apt-get install -y build-essential python3 libudev-dev rpm
|
||||||
|
|
||||||
|
- name: Import Code-Signing Certificates
|
||||||
|
if: startsWith(matrix.os, 'macos')
|
||||||
|
uses: apple-actions/import-codesign-certs@v3
|
||||||
|
with:
|
||||||
|
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
@@ -128,6 +142,8 @@ jobs:
|
|||||||
desktop/dist/*.AppImage
|
desktop/dist/*.AppImage
|
||||||
desktop/dist/*.deb
|
desktop/dist/*.deb
|
||||||
desktop/dist/*.rpm
|
desktop/dist/*.rpm
|
||||||
|
desktop/dist/*.dmg
|
||||||
|
desktop/dist/*-mac.zip
|
||||||
desktop/dist/latest*.yml
|
desktop/dist/latest*.yml
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user