Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
36e9825
sign before packing the file so we sign the actual .node file
scarlin-casechek May 5, 2025
0913e7c
pack the signed binary
sjlehn May 5, 2025
4c4c810
add debug output
sjlehn May 5, 2025
eec5b9e
fix syntax
sjlehn May 5, 2025
20ffc69
specify which archive to upload
sjlehn May 5, 2025
a69d799
include TEAM_ID in echo output
sjlehn May 5, 2025
b9a3c6e
try to sign with one that works for notarized apps
scarlin-casechek May 7, 2025
d76d896
try to sign with one that works for notarized apps
scarlin-casechek May 7, 2025
b55c3b2
run only mac prebuild and use prebuild for all
scarlin-casechek May 7, 2025
55a88a7
try building for electron and skipping target, just to see
scarlin-casechek May 7, 2025
25b28af
try building for electron
scarlin-casechek May 7, 2025
ceb9e9c
try building for electron
scarlin-casechek May 7, 2025
4955979
try building for electron
scarlin-casechek May 7, 2025
e1f5238
try building for electron and node
scarlin-casechek May 7, 2025
30d7eea
try building for electron and node
scarlin-casechek May 7, 2025
0729ba0
try building x64 and arm64 for macos
scarlin-casechek May 7, 2025
a544ff2
try building x64 and arm64 for macos
scarlin-casechek May 7, 2025
8d23f4a
try building x64 and arm64 for macos
scarlin-casechek May 7, 2025
fff9a61
fix copy doh
scarlin-casechek May 7, 2025
e288bfb
fix copy again
scarlin-casechek May 7, 2025
2631aa3
fix mkdir
scarlin-casechek May 7, 2025
e49737c
build for electron
scarlin-casechek May 7, 2025
7f92433
fix package_name so prebuilds match
scarlin-casechek May 7, 2025
2e21f99
build node and electron
scarlin-casechek May 7, 2025
6009e1d
build node and electron
scarlin-casechek May 7, 2025
26e7566
build node and electron
scarlin-casechek May 7, 2025
935ee5e
fix the codesign sign value
scarlin-casechek May 7, 2025
38eaef7
feat: merge CI files
sjlehn May 19, 2025
9e77881
chore: upgrade version to 1.0.0
sjlehn May 19, 2025
2f3d561
feat: create variable for signing identity
sjlehn May 19, 2025
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
146 changes: 0 additions & 146 deletions .github/workflows/prebuild-main.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
name: Prebuild Binaries

on:
push:
branches:
- main
pull_request:

# Add concurrency configuration to ensure only one workflow runs at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
get-version:
name: Get Package Version
Expand All @@ -20,7 +28,12 @@ jobs:

- name: Set release version
id: set-version
run: echo "version=${{ steps.package-version.outputs.current-version }}-pr${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
run: |
if [ -n "${{ github.event.pull_request.number }}" ]; then
echo "version=${{ steps.package-version.outputs.current-version }}-pr${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
else
echo "version=${{ steps.package-version.outputs.current-version }}" >> $GITHUB_OUTPUT
fi

- name: Create GitHub Release
id: create-release
Expand Down Expand Up @@ -58,12 +71,23 @@ jobs:

- name: Build and sign macOS prebuild
run: |
npx prebuild --backend node-gyp --target 20.3.0 --arch x64 --platform darwin --strip --pack
mkdir -p lib/darwin-x64
mkdir -p lib/electron/darwin-x64/
mkdir -p lib/electron/darwin-arm64/
mkdir -p lib/darwin-x64/
mkdir -p lib/darwin-arm64/

npx prebuild --backend node-gyp -t 33.0.2 --arch x64 --platform darwin --strip -r electron -c 'codesign --sign "${{ vars.CERTIFICATE_IDENTITY }}" --timestamp --options runtime --force --verbose lib/node_printer.node'
cp lib/node_printer.node lib/electron/darwin-x64/

npx prebuild --backend node-gyp -t 33.0.2 --arch arm64 --platform darwin --strip -r electron -c 'codesign --sign "${{ vars.CERTIFICATE_IDENTITY }}" --timestamp --options runtime --force --verbose lib/node_printer.node'
cp lib/node_printer.node lib/electron/darwin-arm64/

npx prebuild --backend node-gyp -t 20.3.0 --arch x64 --platform darwin --strip -c 'codesign --sign "${{ vars.CERTIFICATE_IDENTITY }}" --timestamp --options runtime --force --verbose lib/node_printer.node'
cp lib/node_printer.node lib/darwin-x64/
ls -la lib/darwin-x64/ || echo "Directory not found"
codesign --sign "${{ vars.TEAM_ID }}" --timestamp --options runtime lib/darwin-x64/node_printer.node || echo "File not found for signing"
# List directories to see where tar.gz files are

npx prebuild --backend node-gyp -t 20.3.0 --arch arm64 --platform darwin --strip -c 'codesign --sign "${{ vars.CERTIFICATE_IDENTITY }}" --timestamp --options runtime --force --verbose lib/node_printer.node'
cp lib/node_printer.node lib/darwin-arm64/

echo "Checking for tar.gz files:"
find . -name "*.tar.gz" -type f

Expand Down Expand Up @@ -98,21 +122,15 @@ jobs:

- name: Prebuild Windows binaries
run: |
# Create platform-specific directories
mkdir -p lib/win32-x64
mkdir -p lib/win32-ia32

# Build x64 version
npx prebuild --backend node-gyp --target 20.3.0 --arch x64 --platform win32 --strip --pack
# Copy to platform-specific directory
copy lib\node_printer.node lib\win32-x64\

# Build ia32 version
npx prebuild --backend node-gyp --target 20.3.0 --arch ia32 --platform win32 --strip --pack
# Copy to platform-specific directory
copy lib\node_printer.node lib\win32-ia32\

# List the directories to verify
dir lib
dir lib\win32-x64 || echo "x64 directory not found"
dir lib\win32-ia32 || echo "ia32 directory not found"
Expand Down
16 changes: 16 additions & 0 deletions entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?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-unsigned-executable-memory</key>
<true/>
<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.automation.apple-events</key>
<true/>
<key>com.apple.security.device.usb</key>
<true/>
</dict>
</plist>
Loading