-
Notifications
You must be signed in to change notification settings - Fork 1
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
2c5f9b2
commit 7903987
Showing
5 changed files
with
83 additions
and
72 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 |
---|---|---|
|
@@ -18,10 +18,6 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
build: | ||
- platform: "linux/amd64" | ||
os: "ubuntu-20.04" | ||
- platform: "windows/amd64" | ||
os: "windows-latest" | ||
- platform: "darwin/universal" | ||
os: "macos-latest" | ||
|
||
|
@@ -49,14 +45,11 @@ jobs: | |
- name: Install Wails | ||
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | ||
shell: bash | ||
- name: Install Linux Wails deps | ||
if: runner.os == 'Linux' | ||
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu | ||
shell: bash | ||
- name: Install macOS Wails deps | ||
if: runner.os == 'macOS' | ||
run: brew install mitchellh/gon/gon | ||
shell: bash | ||
|
||
# Build | ||
- name: Build App | ||
if: runner.os == 'macOS' | ||
|
@@ -65,31 +58,14 @@ jobs: | |
cp -r assets build/assets | ||
wails build -ldflags "-X main.version=$(git tag --sort=-version:refname | head -n 1)" --platform ${{matrix.build.platform}} --nopackage -webview2 download -o scanoss-lui-macos | ||
shell: bash | ||
- name: Build Linux App | ||
if: runner.os == 'Linux' | ||
run: | | ||
mkdir build | ||
cp -r assets build/assets | ||
wails build -ldflags "-X main.version=$(git tag --sort=-version:refname | head -n 1)" --platform ${{matrix.build.platform}} -webview2 download -o scanoss-lui-linux | ||
shell: bash | ||
- name: Build Windows App | ||
if: runner.os == 'Windows' | ||
run: | | ||
mkdir build | ||
cp -r assets build/assets | ||
wails build -ldflags "-X main.version=$(git tag --sort=-version:refname | head -n 1)" --platform ${{matrix.build.platform}} -webview2 download -o scanoss-lui-windows.exe | ||
shell: bash | ||
|
||
|
||
# Set execution permissions | ||
- name: Add macOS perms | ||
if: runner.os == 'macOS' | ||
run: chmod +x ./build/bin/scanoss-lui-macos | ||
shell: bash | ||
|
||
- name: Add Linux perms | ||
if: runner.os == 'Linux' | ||
run: chmod +x ./build/bin/scanoss-lui-linux | ||
shell: bash | ||
|
||
# macOS Signing | ||
- name: Import Code-Signing Certificates for macOS | ||
|
@@ -100,59 +76,36 @@ jobs: | |
p12-file-base64: ${{ secrets.MACOS_DEVELOPER_CERT }} | ||
p12-password: ${{ secrets.MACOS_DEVELOPER_CERT_PASSWORD }} | ||
|
||
- name: Sign macOS binary | ||
if: runner.os == 'macOS' && startsWith(github.ref, 'refs/tags/') | ||
shell: bash | ||
- name: Sign and Notarize | ||
env: | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
APPLE_ID: [email protected] | ||
APPLE_DEVELOPER_ID: ${{ secrets.MACOS_DEVELOPER_CERT_ID }} | ||
APP_CERTIFICATE: ${{ secrets.MACOS_DEVELOPER_CERT_FULL_ID }} | ||
PROVIDER: ${{ secrets.PROVIDER }} | ||
run: | | ||
echo "Signing Package" | ||
codesign --timestamp --deep --options=runtime -s "$APP_CERTIFICATE" --verbose ./build/bin/scanoss-lui-macos | ||
- name: Build macOS zip file | ||
if: runner.os == 'macOS' | ||
shell: bash | ||
run: | | ||
cd ./build/bin/ && zip scanoss-lui-macos.zip scanoss-lui-macos | ||
- name: Build Linux zip file | ||
if: runner.os == 'Linux' | ||
shell: bash | ||
run: | | ||
cd ./build/bin/ && zip scanoss-lui-linux.zip scanoss-lui-linux | ||
- name: Build Windows zip file | ||
if: runner.os == 'Windows' | ||
shell: powershell | ||
run: | | ||
cd ./build/bin/; Compress-Archive -Path scanoss-lui-windows.exe -Destination scanoss-lui-windows.zip | ||
- name: Notarize | ||
if: runner.os == 'macOS' && startsWith(github.ref, 'refs/tags/') | ||
shell: bash | ||
env: | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
APPLE_ID: [email protected] | ||
APPLE_DEVELOPER_ID: ${{ secrets.MACOS_DEVELOPER_CERT_ID }} | ||
run: | | ||
xcrun notarytool submit ./build/bin/scanoss-lui-macos.zip --apple-id "${APPLE_ID?}" --team-id "${APPLE_DEVELOPER_ID?}" --password "${APPLE_PASSWORD?}" | ||
# Upload build assets | ||
- uses: actions/upload-artifact@v4 | ||
codesign --timestamp --deep --options=runtime -s "$APP_CERTIFICATE" --verbose ./build/bin/scanoss-lui-macos | ||
echo "Verifying signature" | ||
codesign -vvv --deep --strict ./build/bin/scanoss-lui-macos | ||
echo "Preparing for notarization" | ||
ditto -c -k --keepParent ./build/bin/scanoss-lui-macos ./build/bin/scanoss-lui-macos.zip | ||
echo "Submitting for notarization" | ||
xcrun notarytool submit ./build/bin/scanoss-lui-macos.zip --apple-id "$APPLE_ID" --team-id "$PROVIDER" --password "$APPLE_PASSWORD" --wait | ||
echo "Creating final zip with notarized and stapled app" | ||
ditto -c -k --keepParent ./build/bin/scanoss-lui-macos ./build/bin/scanoss-lui-macos-notarized.zip | ||
echo "Signing and notarization complete" | ||
- name: Upload build assets | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Wails Build ${{runner.os}} | ||
path: | | ||
*/bin/*.zip | ||
*\bin\*.zip | ||
path: ./build/bin/scanoss-lui-macos-notarized.zip | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
*/bin/*.zip | ||
prerelease: true | ||
|
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,30 @@ | ||
<?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>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleName</key> | ||
<string>scanoss-lui</string> | ||
<key>CFBundleExecutable</key> | ||
<string>scanoss-lui</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.example.myapp</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0.0</string> | ||
<key>CFBundleGetInfoString</key> | ||
<string>scanoss-lui</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0.0</string> | ||
<key>CFBundleIconFile</key> | ||
<string>icon.icns</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>10.13.0</string> | ||
<key>NSHighResolutionCapable</key> | ||
<string>true</string> | ||
<key>LSApplicationCategoryType</key> | ||
<string>public.app-category.utilities</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>© 2024 SCANOSS</string> | ||
</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 |
---|---|---|
@@ -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.app-sandbox</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-write</key> | ||
<true/> | ||
<key>com.apple.security.files.downloads.read-write</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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"source": ["../build/bin/scanoss-lui-macos"], | ||
"bundle_id": "com.scanoss.scanoss-lui-macos", | ||
"apple_id": { | ||
"username": "[email protected]", | ||
"password": "@env:APPLE_PASSWORD", | ||
"provider": "@env:PROVIDER" | ||
}, | ||
"sign" :{ | ||
"application_identity": "Developer ID Application: Esmeralda Mendez Rodriguez" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"frontend:dev:watcher": "npm run dev", | ||
"frontend:dev:serverUrl": "auto", | ||
"author": { | ||
"name": "Agustin Isasmendi", | ||
"name": "scanoss-lui", | ||
"email": "[email protected]" | ||
} | ||
} |