-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.36 KB
/
release.yml
File metadata and controls
77 lines (65 loc) · 2.36 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
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
SCHEME: nutcracker
PROJECT: nutcracker.xcodeproj
CONFIGURATION: Release
APP_NAME: nutcracker
jobs:
build:
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Build and Archive
run: |
xcodebuild archive \
-project ${{ env.PROJECT }} \
-scheme ${{ env.SCHEME }} \
-configuration ${{ env.CONFIGURATION }} \
-archivePath $RUNNER_TEMP/${{ env.APP_NAME }}.xcarchive \
-destination 'platform=macOS' \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Export app
run: |
mkdir -p $RUNNER_TEMP/export
cp -R $RUNNER_TEMP/${{ env.APP_NAME }}.xcarchive/Products/Applications/${{ env.APP_NAME }}.app $RUNNER_TEMP/export/
- name: Create DMG
run: |
brew install create-dmg
create-dmg \
--volname "${{ env.APP_NAME }}" \
--window-pos 200 120 \
--window-size 800 450 \
--icon-size 100 \
--icon "${{ env.APP_NAME }}.app" 200 190 \
--hide-extension "${{ env.APP_NAME }}.app" \
--app-drop-link 600 185 \
"${{ env.APP_NAME }}.dmg" \
"$RUNNER_TEMP/export/${{ env.APP_NAME }}.app" || true
if [ ! -f "${{ env.APP_NAME }}.dmg" ]; then
hdiutil create -volname "${{ env.APP_NAME }}" \
-srcfolder "$RUNNER_TEMP/export/${{ env.APP_NAME }}.app" \
-ov -format UDZO "${{ env.APP_NAME }}.dmg"
fi
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: ${{ env.APP_NAME }}.dmg
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-beta') || contains(github.ref, '-alpha') }}
body: |
## Installation
1. Download `nutcracker.dmg`
2. Open the DMG
3. Drag **nutcracker** to **Applications**
4. Right-click the app in Applications → **Open** → Click **Open** when prompted
The app is unsigned. macOS will show a warning — this is normal for apps not distributed through the App Store.