-
-
Notifications
You must be signed in to change notification settings - Fork 148
102 lines (85 loc) 路 2.79 KB
/
Copy pathdev-build.yml
File metadata and controls
102 lines (85 loc) 路 2.79 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Dev Build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
paths:
- "**.swift"
- "Package.swift"
- "Info.plist"
- "Kaset.entitlements"
- "Sources/**"
- "Tests/**"
- "Scripts/**"
- ".github/workflows/dev-build.yml"
pull_request:
paths:
- "**.swift"
- "Package.swift"
- "Info.plist"
- "Kaset.entitlements"
- "Sources/**"
- "Tests/**"
- "Scripts/**"
- ".github/workflows/dev-build.yml"
workflow_dispatch:
jobs:
build:
runs-on: macos-26
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer
- name: Show Swift version
run: swift --version
- name: Cache SPM dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/Library/Caches/org.swift.swiftpm/spm-repositories
key: ${{ runner.os }}-spm-build-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-build-
- name: Clear SPM binary artifacts cache
run: rm -rf ~/Library/Caches/org.swift.swiftpm/artifacts
- name: Get short SHA
id: slug
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build app
env:
KASET_SIGNING: adhoc
ARCHES: "arm64 x86_64"
run: |
# Override version for dev builds
echo "MARKETING_VERSION=0.0.0-dev.${{ steps.slug.outputs.sha_short }}" > version.env
echo "BUILD_NUMBER=${{ github.run_number }}" >> version.env
Scripts/build-app.sh release
- name: Verify packaged app
run: Scripts/verify-release-app.sh .build/app/Kaset.app
- name: Create DMG
run: |
APP_PATH=".build/app/Kaset.app"
if [ ! -d "$APP_PATH" ]; then
echo "Error: Could not find Kaset.app"
exit 1
fi
echo "Found app at: $APP_PATH"
# Create a temporary directory for DMG contents
mkdir -p dmg_contents
cp -R "$APP_PATH" dmg_contents/
# Create DMG
hdiutil create -volname "Kaset-dev" \
-srcfolder dmg_contents \
-ov -format UDZO \
kaset-dev.dmg
- name: Upload DMG
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4
if: github.event_name != 'pull_request'
with:
name: kaset-dev-${{ steps.slug.outputs.sha_short }}
path: kaset-dev.dmg
retention-days: 30