|
| 1 | +name: Build and Release DadSoft |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + tag: |
| 10 | + description: 'Release tag (e.g. v1.0.0)' |
| 11 | + required: true |
| 12 | + |
| 13 | +permissions: |
| 14 | + contents: write |
| 15 | + |
| 16 | +jobs: |
| 17 | + build: |
| 18 | + name: Build DadSoft.app |
| 19 | + runs-on: macos-14 |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - name: Select Xcode |
| 24 | + run: sudo xcode-select -s /Applications/Xcode_16.app || sudo xcode-select -s /Applications/Xcode.app |
| 25 | + |
| 26 | + - name: Build release binary |
| 27 | + working-directory: DadSoft |
| 28 | + run: swift build -c release |
| 29 | + |
| 30 | + - name: Create .app bundle |
| 31 | + working-directory: DadSoft |
| 32 | + run: | |
| 33 | + APP="DadSoft.app" |
| 34 | + rm -rf "$APP" |
| 35 | + mkdir -p "$APP/Contents/MacOS" |
| 36 | + mkdir -p "$APP/Contents/Resources" |
| 37 | + cp .build/release/DadSoft "$APP/Contents/MacOS/" |
| 38 | + cp Resources/Info.plist "$APP/Contents/" |
| 39 | + cp Resources/AppIcon.icns "$APP/Contents/Resources/" |
| 40 | +
|
| 41 | + # Copy SPM resource bundles (images, etc.) |
| 42 | + for bundle in .build/release/*.bundle; do |
| 43 | + [ -e "$bundle" ] && cp -r "$bundle" "$APP/Contents/Resources/" |
| 44 | + done |
| 45 | +
|
| 46 | + # Strip extended attributes that break codesign |
| 47 | + xattr -cr "$APP" |
| 48 | +
|
| 49 | + - name: Ad-hoc codesign with entitlements |
| 50 | + working-directory: DadSoft |
| 51 | + run: | |
| 52 | + codesign --entitlements Resources/entitlements.plist \ |
| 53 | + --force --deep -s - DadSoft.app |
| 54 | +
|
| 55 | + - name: Verify codesign |
| 56 | + working-directory: DadSoft |
| 57 | + run: codesign -dvv DadSoft.app |
| 58 | + |
| 59 | + - name: Install create-dmg |
| 60 | + run: brew install create-dmg |
| 61 | + |
| 62 | + - name: Create DMG |
| 63 | + working-directory: DadSoft |
| 64 | + run: | |
| 65 | + DMG_NAME="DadSoft-Installer.dmg" |
| 66 | + create-dmg \ |
| 67 | + --volname "DadSoft" \ |
| 68 | + --background "Resources/dmg_background.png" \ |
| 69 | + --window-pos 200 120 \ |
| 70 | + --window-size 660 400 \ |
| 71 | + --icon-size 160 \ |
| 72 | + --icon "DadSoft.app" 180 170 \ |
| 73 | + --app-drop-link 480 170 \ |
| 74 | + --no-internet-enable \ |
| 75 | + "$DMG_NAME" \ |
| 76 | + "DadSoft.app" |
| 77 | + echo "DMG_PATH=DadSoft/$DMG_NAME" >> "$GITHUB_ENV" |
| 78 | +
|
| 79 | + - name: Determine tag |
| 80 | + id: tag |
| 81 | + run: | |
| 82 | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then |
| 83 | + echo "version=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT" |
| 84 | + else |
| 85 | + echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" |
| 86 | + fi |
| 87 | +
|
| 88 | + - name: Create GitHub Release |
| 89 | + uses: softprops/action-gh-release@v2 |
| 90 | + with: |
| 91 | + tag_name: ${{ steps.tag.outputs.version }} |
| 92 | + name: DadSoft ${{ steps.tag.outputs.version }} |
| 93 | + body: | |
| 94 | + ## How to Install DadSoft |
| 95 | +
|
| 96 | + **Step 1.** Click on **DadSoft-Installer.dmg** below to download it. |
| 97 | +
|
| 98 | + **Step 2.** Open the downloaded file and drag **DadSoft** into the **Applications** folder. |
| 99 | +
|
| 100 | + **Step 3.** Open **Applications** and double-click **DadSoft**. macOS will show a warning — click **Done** (don't move to trash). |
| 101 | +
|
| 102 | + **Step 4.** Go to **System Settings → Privacy & Security**, scroll down, and click **Open Anyway** next to the DadSoft message. Click **Open** on the dialog that appears. You only have to do this once. ([Detailed guide with pictures](https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac)) |
| 103 | +
|
| 104 | + That's it! DadSoft will open normally from now on. |
| 105 | +
|
| 106 | + --- |
| 107 | +
|
| 108 | + **What is DadSoft?** |
| 109 | + A toolkit for your Mac that helps you set up Windows 11 and remote control access. Everything is step-by-step with big buttons — no Terminal or technical knowledge needed. |
| 110 | +
|
| 111 | + **Requirements:** Apple Silicon Mac (M1/M2/M3/M4), macOS 13 or later, internet connection, ~30 GB free space. |
| 112 | + files: ${{ env.DMG_PATH }} |
| 113 | + draft: false |
| 114 | + prerelease: false |
0 commit comments