-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (64 loc) · 3.32 KB
/
Copy pathrelease.yml
File metadata and controls
80 lines (64 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Release Unsigned macOS App
on:
push:
tags:
- 'v*' # Triggers the build automatically whenever I push a tag like v1.0.0
jobs:
release:
runs-on: xcode-27 # NOTE: Ensure this is a valid self-hosted runner tag!
permissions:
contents: write # Grants GitHub permission to create a release and upload files
steps:
- name: Checkout Code
uses: actions/checkout@v4
# Note: Manual xcode-select is removed as Xcode 27 is the native default on this runner.
- name: Extract Version String
id: get_version
run: |
TAG_NAME="${{ github.ref_name }}"
VERSION="${TAG_NAME#v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "CLEAN_VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Build App Archive
run: |
xcodebuild archive \
-project "SMC_breach.xcodeproj" \
-scheme "SMC_breach" \
-configuration Release \
-archivePath $RUNNER_TEMP/SMC_breach.xcarchive \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY=""
- name: Export and Build Raw Package (.pkg)
run: |
mkdir -p $RUNNER_TEMP/ExportedApp
# Copy the app
cp -R "$RUNNER_TEMP/SMC_breach.xcarchive/Products/Applications/SMC Breach.app" "$RUNNER_TEMP/ExportedApp/"
# Convert space in filename
mv "$RUNNER_TEMP/ExportedApp/SMC Breach.app" "$RUNNER_TEMP/ExportedApp/SMC_breach.app"
# FORCE EXECUTABLE PERMISSIONS HERE
chmod +x "$RUNNER_TEMP/ExportedApp/SMC_breach.app/Contents/MacOS/"*
# APPLY AD-HOC SIGNATURE (Apparently Crucial for Apple Silicon)
codesign --force --deep --sign - "$RUNNER_TEMP/ExportedApp/SMC_breach.app"
# Build PKG
pkgbuild --component "$RUNNER_TEMP/ExportedApp/SMC_breach.app" \
--install-location "/Applications" \
"$GITHUB_WORKSPACE/SMC_breach-${{ env.VERSION }}.pkg"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: SMC_breach-${{ github.env.VERSION || steps.get_version.outputs.CLEAN_VERSION }}.pkg
body: |
## 🚀 SMC_breach Installer Release (${{ github.ref_name }})
### ⚠️ macOS Security Installation Note
Because this application is built for the community without a paid Apple Developer Account, macOS Gatekeeper will protectively block the installer package on its first launch.
**To run this app on your Mac safely:**
1. Download the single **SMC_breach-${{ env.VERSION }}.pkg** file below.
2. Open your **Terminal** app and paste this exact command to clear the download quarantine flag before launching:
```bash
xattr -cr ~/Downloads/SMC_breach-\${{ env.VERSION }}.pkg
```
3. Double-click the `.pkg` file to install `SMC_breach` smoothly into your Applications folder.
*Alternatively: Right-click (or Control-click) the pkg file, choose **Open**, and select **Open Anyway** via your Mac's System Settings > Privacy & Security menu.*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}