-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aef63a6
commit c683272
Showing
4 changed files
with
3,455 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,53 @@ | ||
name: Build | ||
name: Build and Release | ||
|
||
on: [push, workflow_dispatch] | ||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' # Trigger on version tags like v1.0.0 | ||
|
||
jobs: | ||
build_desktop: | ||
name: Build Desktop on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, macos-latest] | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm i | ||
- name: Build | ||
uses: samuelmeuli/[email protected] | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
release: true | ||
skip_build: true | ||
## - name: Get current version | ||
## uses: Saionaro/[email protected] | ||
## id: package-version | ||
## - name: Upload Artifact | ||
## uses: actions/upload-artifact@v2 | ||
## if: matrix.os == 'ubuntu-latest' | ||
## with: | ||
## name: 'beacon-${{ steps.package-version.outputs.version }}-Linux' | ||
## path: 'release/beacon-${{ steps.package-version.outputs.version }}.AppImage' | ||
## - name: Upload Artifact | ||
## uses: actions/upload-artifact@v2 | ||
## if: matrix.os == 'macos-latest' | ||
## with: | ||
## name: 'beacon-${{ steps.package-version.outputs.version }}-MacOS' | ||
## path: 'release/beacon-${{ steps.package-version.outputs.version }}.dmg' | ||
## - name: Upload Artifact | ||
## uses: actions/upload-artifact@v2 | ||
## if: matrix.os == 'windows-latest' | ||
## with: | ||
## name: 'beacon-${{ steps.package-version.outputs.version }}-Windows' | ||
## path: 'release/beacon Setup ${{ steps.package-version.outputs.version }}.exe' | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: yarn install --production | ||
|
||
# macOS-specific steps for code signing and notarization | ||
- name: Import Apple Developer Certificate (macOS only) | ||
if: matrix.os == 'macos-latest' | ||
env: | ||
DEVELOPER_ID_CERT: ${{ secrets.DEVELOPER_ID_CERT }} | ||
DEVELOPER_ID_CERT_PASSWORD: ${{ secrets.DEVELOPER_ID_CERT_PASSWORD }} | ||
run: | | ||
echo "$DEVELOPER_ID_CERT" | base64 --decode > developer_id_certificate.p12 | ||
security create-keychain -p "" build.keychain | ||
security default-keychain -s build.keychain | ||
security unlock-keychain -p "" build.keychain | ||
security import developer_id_certificate.p12 -k build.keychain -P "$DEVELOPER_ID_CERT_PASSWORD" -T /usr/bin/codesign | ||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" build.keychain | ||
- name: List Certificates in Keychain (macOS only) | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
security find-identity -v -p codesigning | ||
- name: Build and Release | ||
uses: samuelmeuli/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
release: true | ||
env: | ||
DEBUG: electron-notarize* | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | ||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
<key>com.apple.security.cs.disable-library-validation</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.debugger</key> | ||
<true/> | ||
<key>com.apple.security.network.client</key> | ||
<true/> | ||
<key>com.apple.security.network.server</key> | ||
<true/> | ||
<key>com.apple.security.files.user-selected.read-only</key> | ||
<true/> | ||
<key>com.apple.security.inherit</key> | ||
<true/> | ||
<key>com.apple.security.automation.apple-events</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,54 @@ | ||
{ | ||
"name": "beacon", | ||
"productName": "beacon", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"author": "Joseph Adams <[email protected]>", | ||
"description": "Control a USB Busylight as a Beacon/Notification", | ||
"license": "MIT", | ||
"repository": "josephdadams/beacon", | ||
"author": { | ||
"name": "Joseph Adams", | ||
"email": "[email protected]", | ||
"url": "https://josephadams.dev" | ||
}, | ||
"main": "dist/main.js", | ||
"scripts": { | ||
"postinstall": "electron-builder install-app-deps", | ||
"lint": "xo", | ||
"test": "npm run lint", | ||
"start": "electron .", | ||
"pack": "electron-builder --dir", | ||
"dist": "electron-builder --macos --linux --windows", | ||
"release": "np" | ||
"format": "prettier -w .", | ||
"lint:raw": "eslint --ext .ts --ext .js --ignore-pattern dist --ignore-pattern pkg", | ||
"lint": "yarn lint:raw ." | ||
}, | ||
"build": { | ||
"appId": "com.josephadams.beacon", | ||
"productName": "beacon", | ||
"files": [ | ||
"dist/**/*", | ||
"public/**/*", | ||
"assets/**/*" | ||
], | ||
"mac": { | ||
"target": [ | ||
{ | ||
"target": "dmg", | ||
"arch": [ | ||
"x64", | ||
"arm64" | ||
] | ||
} | ||
], | ||
"category": "public.app-category.utilities", | ||
"icon": "assets/tray-icon.png", | ||
"identity": "Joseph Adams (R2PY2DC3A4)", | ||
"extendInfo": { | ||
"NSApplicationSupportsSecureRestorableState": true, | ||
"electronTeamId": "R2PY2DC3A4" | ||
}, | ||
"hardenedRuntime": true, | ||
"gatekeeperAssess": true, | ||
"entitlements": "entitlements.mac.plist", | ||
"entitlementsInherit": "entitlements.mac.plist" | ||
}, | ||
"win": { | ||
"target": "nsis", | ||
"icon": "assets/icon.ico" | ||
}, | ||
"linux": { | ||
"target": "AppImage", | ||
"icon": "static/icon.png" | ||
}, | ||
"generateUpdatesFilesForAllChannels": false | ||
}, | ||
"dependencies": { | ||
"busylight": "^0.6.0", | ||
|
@@ -36,41 +67,9 @@ | |
"socket.io": "^4.5.1" | ||
}, | ||
"devDependencies": { | ||
"electron": "^26.1.0", | ||
"electron-builder": "^23.0.2", | ||
"np": "^7.5.0", | ||
"xo": "^0.39.1" | ||
}, | ||
"xo": { | ||
"envs": [ | ||
"node", | ||
"browser" | ||
] | ||
}, | ||
"np": { | ||
"publish": false, | ||
"releaseDraft": false | ||
}, | ||
"build": { | ||
"appId": "com.josephadams.beacon", | ||
"mac": { | ||
"category": "public.app-category.productivity", | ||
"darkModeSupport": true | ||
}, | ||
"dmg": { | ||
"iconSize": 160, | ||
"contents": [ | ||
{ | ||
"x": 180, | ||
"y": 170 | ||
}, | ||
{ | ||
"x": 480, | ||
"y": 170, | ||
"type": "link", | ||
"path": "/Applications" | ||
} | ||
] | ||
} | ||
"@electron/notarize": "^2.5.0", | ||
"electron": "^33.2.1", | ||
"electron-builder": "^25.1.8", | ||
"prettier": "^3.3.3" | ||
} | ||
} |
Oops, something went wrong.