Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 33 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,38 @@ jobs:
dist/LP-700-App-*.radioplugin.sha256
retention-days: 30

- name: Compose release notes
if: steps.ver.outputs.skip != 'true'
env:
V: ${{ steps.ver.outputs.value }}
REPO: ${{ github.repository }}
# 'true' only when the signing + notary secrets are present — i.e. the build was
# Developer-ID signed and Apple-notarized. Otherwise it's an ad-hoc build.
NOTARIZED: ${{ secrets.MACOS_CERT_P12_BASE64 != '' && secrets.NOTARY_PASSWORD != '' }}
run: |
set -euo pipefail
{
echo "## LP-700-App ${V}"
echo
echo "macOS native client for the [LP-700 WebSocket Server](https://github.com/VU3ESV/LP-700-Server)."
echo
echo "### Install"
echo
echo "1. Download \`LP-700-App-${V}.dmg\` below."
echo "2. Open the DMG and drag **LP-700-App.app** to **/Applications**."
if [ "${NOTARIZED}" = "true" ]; then
echo "3. Launch it — signed with Developer ID and **Apple-notarized**, so no Gatekeeper bypass is needed."
else
echo "3. **One-time Gatekeeper bypass** (this build is ad-hoc-signed, not Apple-notarized):"
echo " \`\`\`sh"
echo " xattr -dr com.apple.quarantine /Applications/LP-700-App.app"
echo " \`\`\`"
echo "4. Launch normally."
fi
echo
echo "See [README](https://github.com/${REPO}#install) and [ARCHITECTURE.md](https://github.com/${REPO}/blob/main/ARCHITECTURE.md)."
} > dist/RELEASE_NOTES.md

- name: Create GitHub release
if: steps.ver.outputs.skip != 'true'
uses: softprops/action-gh-release@v3
Expand All @@ -177,23 +209,7 @@ jobs:
draft: false
prerelease: ${{ inputs.prerelease == true }}
generate_release_notes: true
body: |
## LP-700-App ${{ steps.ver.outputs.value }}

macOS native client for the [LP-700 WebSocket Server](https://github.com/VU3ESV/LP-700-Server).

### Install

1. Download `LP-700-App-${{ steps.ver.outputs.value }}.dmg` below.
2. Open the DMG and drag **LP-700-App.app** to **/Applications**.
3. **One-time Gatekeeper bypass** (this build is ad-hoc-signed, not Apple-notarized):
```sh
xattr -dr com.apple.quarantine /Applications/LP-700-App.app
```
4. Launch normally.

See [README](https://github.com/${{ github.repository }}#install) and
[ARCHITECTURE.md](https://github.com/${{ github.repository }}/blob/main/ARCHITECTURE.md).
body_path: dist/RELEASE_NOTES.md
files: |
dist/LP-700-App-*.dmg
dist/LP-700-App-*.dmg.sha256
Expand Down
16 changes: 13 additions & 3 deletions scripts/package-signed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,22 @@ if [ -n "${MACOS_CERT_P12_BASE64:-}" ]; then
IDENTITY="$(security find-identity -v -p codesigning "$KC" | sed -n 's/.*"\(Developer ID Application: .*\)"/\1/p' | head -1)"
fi

# codesign with a few retries — Apple's secure-timestamp service is intermittently unavailable
# ("The timestamp service is not available."), which would otherwise fail the whole release.
cs() {
local n=1
until codesign "$@"; do
[ "$n" -ge 4 ] && return 1
echo " codesign attempt $n failed — retrying in 15s…" >&2; sleep 15; n=$((n + 1))
done
}

# --- sign inside-out (extension first, then the app) ------------------------------------
if [ -n "$IDENTITY" ]; then
echo "==> Signing with: $IDENTITY"
codesign --force -s "$IDENTITY" -o runtime --timestamp \
cs --force -s "$IDENTITY" -o runtime --timestamp \
--entitlements "$ENTITLEMENTS" "$APP/Contents/Extensions/$APPEX_NAME"
codesign --force -s "$IDENTITY" -o runtime --timestamp "$APP"
cs --force -s "$IDENTITY" -o runtime --timestamp "$APP"
else
echo "==> WARNING: no MACOS_CERT_P12_BASE64 — ad-hoc signing (extension will NOT register on other Macs)"
codesign --force -s - --deep "$APP"
Expand Down Expand Up @@ -107,7 +117,7 @@ DMG="dist/LP-700-App-${VERSION}.dmg"
# Gatekeeper prompt), then notarize + staple the DMG itself.
if [ -n "$IDENTITY" ]; then
echo "==> Codesigning the DMG"
codesign --force -s "$IDENTITY" --timestamp "$DMG"
cs --force -s "$IDENTITY" --timestamp "$DMG"
fi
if [ "$HAVE_NOTARY" = 1 ]; then
echo "==> Notarizing the DMG + stapling (a few minutes)…"
Expand Down