Skip to content

Commit c3bb510

Browse files
authored
Fix-platform-builds
* refactor: Move Wails service bindings to internal/wails package Moves all Wails service wrapper files from root directory to internal/wails/ for better organization and separation of concerns. Changes: - Moved: jwt_service.go, barcode_service.go, conversion_service.go, data_generator_service.go, codeformatter_service.go - Updated package from 'main' to 'wails' - Changed startup() to Startup() (exported method) - Updated main.go and server.go imports - Updated type references to use wails package * fix: wrong be package, try to build proper binary for each platform * fix: unit tests * fix: unit tests path * Fix-windows-build (#20) * Fix Windows build: remove redundant mv command since Wails already outputs .exe * Make code signing optional and add macOS installation instructions for unsigned builds
1 parent 9688273 commit c3bb510

2 files changed

Lines changed: 106 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,80 @@ jobs:
6262
run: |
6363
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
6464
wails build -platform ${{ matrix.platform }} -tags webkit2_41
65+
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
66+
# macOS: Build with code signing if certificates are available
67+
if [ -n "$MACOS_CERTIFICATE" ] && [ -n "$MACOS_CERTIFICATE_PASSWORD" ]; then
68+
echo "Building with code signing..."
69+
wails build -platform ${{ matrix.platform }} -sign -signIdentity "Developer ID Application"
70+
else
71+
echo "Building without code signing (no certificates found)..."
72+
wails build -platform ${{ matrix.platform }}
73+
fi
6574
else
6675
wails build -platform ${{ matrix.platform }}
6776
fi
6877
shell: bash
78+
env:
79+
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
80+
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
81+
82+
# Import macOS certificates for signing (optional - only if secrets are configured)
83+
- name: Import macOS Certificates
84+
if: matrix.os == 'macos-latest' && github.event_name != 'pull_request' && env.HAS_CERTS == 'true'
85+
uses: apple-actions/import-codesign-certs@v2
86+
with:
87+
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
88+
p12-password: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
89+
keychain: build
90+
keychain-password: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
91+
env:
92+
HAS_CERTS: ${{ secrets.MACOS_CERTIFICATE != '' && secrets.MACOS_CERTIFICATE_PASSWORD != '' }}
93+
94+
# Notarize macOS app (optional - only if secrets are configured)
95+
- name: Notarize macOS App
96+
if: matrix.os == 'macos-latest' && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') && env.HAS_NOTARIZE_SECRETS == 'true'
97+
run: |
98+
# Create a zip for notarization
99+
ditto -c -k --keepParent "build/bin/dev-toolbox.app" "build/bin/dev-toolbox.zip"
100+
101+
# Submit for notarization
102+
xcrun notarytool submit "build/bin/dev-toolbox.zip" \
103+
--apple-id "${{ secrets.APPLE_ID }}" \
104+
--password "${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}" \
105+
--team-id "${{ secrets.APPLE_TEAM_ID }}" \
106+
--wait
107+
108+
# Staple the notarization ticket
109+
xcrun stapler staple "build/bin/dev-toolbox.app"
110+
env:
111+
APPLE_ID: ${{ secrets.APPLE_ID }}
112+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
113+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
114+
HAS_NOTARIZE_SECRETS: ${{ secrets.APPLE_ID != '' && secrets.APPLE_APP_SPECIFIC_PASSWORD != '' && secrets.APPLE_TEAM_ID != '' }}
115+
116+
# Package and upload build artifacts
117+
- name: Package Artifacts
118+
run: |
119+
mkdir -p release
120+
if [ "${{ matrix.os }}" = "macos-latest" ]; then
121+
# macOS: create DMG using create-dmg
122+
brew install create-dmg
123+
create-dmg \
124+
--volname "Dev-Toolbox" \
125+
--window-pos 200 120 \
126+
--window-size 800 400 \
127+
--icon-size 100 \
128+
--app-drop-link 600 185 \
129+
"release/dev-toolbox-${{ matrix.build }}.dmg" \
130+
"build/bin/dev-toolbox.app"
131+
elif [ "${{ matrix.os }}" = "windows-latest" ]; then
132+
# Windows: Wails already outputs .exe, just copy it
133+
cp build/bin/dev-toolbox.exe release/dev-toolbox-${{ matrix.build }}.exe
134+
else
135+
# Linux: create AppImage or tar.gz
136+
tar -czf "release/dev-toolbox-${{ matrix.build }}.tar.gz" -C build/bin dev-toolbox
137+
fi
138+
shell: bash
69139

70140
# Package and upload build artifacts
71141
- name: Package Artifacts

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,42 @@ wails build
7979
wails dev
8080
```
8181

82+
## Installation
83+
84+
Download the latest release for your platform from the [Releases](https://github.com/vuon9/dev-toolbox/releases) page.
85+
86+
### macOS
87+
88+
⚠️ **Note:** The macOS build is not signed with an Apple Developer certificate (requires $99/year). You may see a security warning when opening the app.
89+
90+
**To bypass the security warning:**
91+
92+
1. Download the `dev-toolbox-macos.dmg` file
93+
2. Open the DMG and drag the app to your Applications folder
94+
3. **First time only:** Open Terminal and run:
95+
```bash
96+
xattr -cr /Applications/dev-toolbox.app
97+
```
98+
Or alternatively:
99+
- Go to **System Settings****Privacy & Security**
100+
- Scroll down to the "Security" section
101+
- Click **"Open Anyway"** next to the message about "dev-toolbox"
102+
- Click **"Open"** in the dialog that appears
103+
104+
4. The app will now open normally
105+
106+
### Windows
107+
108+
1. Download `dev-toolbox-windows.exe`
109+
2. Run the executable
110+
3. If Windows Defender shows a warning, click **"More info"****"Run anyway"**
111+
112+
### Linux
113+
114+
1. Download `dev-toolbox-linux.tar.gz`
115+
2. Extract: `tar -xzf dev-toolbox-linux.tar.gz`
116+
3. Run: `./dev-toolbox`
117+
82118
## Key Features
83119

84120
**Works Offline** - All tools run locally, no internet connection required

0 commit comments

Comments
 (0)