-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (102 loc) · 3.58 KB
/
Copy pathci.yaml
File metadata and controls
107 lines (102 loc) · 3.58 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
103
104
105
106
107
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
tags:
- "v*"
permissions:
contents: read
jobs:
test:
name: Build and test
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
runs-on: macos-15
steps:
- name: Check out source
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Show Xcode version
run: xcodebuild -version
- name: Check release version policy
run: ./scripts/test-release-version.sh
- name: Build tests
run: |
xcodebuild build-for-testing \
-project HyperWindow.xcodeproj \
-scheme HyperWindow \
-configuration Debug \
-derivedDataPath build \
-destination 'platform=macOS'
/usr/bin/xcrun swift ./scripts/sign-local-app.swift \
build/Build/Products/Debug/HyperWindow.app
- name: Run tests
timeout-minutes: 5
run: |
xcodebuild test-without-building \
-project HyperWindow.xcodeproj \
-scheme HyperWindow \
-configuration Debug \
-derivedDataPath build \
-destination 'platform=macOS' \
-only-testing:HyperWindowTests
- name: Build and verify release app
run: ./scripts/build-release.sh
release:
name: Test and publish universal macOS release
if: startsWith(github.ref, 'refs/tags/v')
runs-on: macos-15
permissions:
contents: write
steps:
- name: Check out source
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Check release version policy
run: ./scripts/test-release-version.sh
- name: Build tests
run: |
xcodebuild build-for-testing \
-project HyperWindow.xcodeproj \
-scheme HyperWindow \
-configuration Debug \
-derivedDataPath build \
-destination 'platform=macOS'
/usr/bin/xcrun swift ./scripts/sign-local-app.swift \
build/Build/Products/Debug/HyperWindow.app
- name: Run tests
timeout-minutes: 5
run: |
xcodebuild test-without-building \
-project HyperWindow.xcodeproj \
-scheme HyperWindow \
-configuration Debug \
-derivedDataPath build \
-destination 'platform=macOS' \
-only-testing:HyperWindowTests
- name: Package release
run: ./scripts/package-release.sh "$GITHUB_REF_NAME"
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_NOTES: |
Download `HyperWindow-…-macos-universal.dmg` and verify its matching SHA-256 checksum.
The app is universal arm64/x86_64 and ad-hoc signed, not Developer ID signed or notarized. macOS may require Privacy & Security → Open Anyway.
run: |
source scripts/release-version.sh
release_version_parse "$GITHUB_REF_NAME"
release_flags=()
if [[ "$RELEASE_IS_PRERELEASE" == 1 ]]; then
release_flags+=(--prerelease --latest=false)
fi
gh release create "$GITHUB_REF_NAME" \
"dist/HyperWindow-${GITHUB_REF_NAME}-macos-universal.dmg#HyperWindow universal macOS DMG" \
"dist/HyperWindow-${GITHUB_REF_NAME}-macos-universal.dmg.sha256#HyperWindow DMG SHA-256" \
--title "$GITHUB_REF_NAME" \
--verify-tag \
"${release_flags[@]}" \
--notes "$RELEASE_NOTES" \
--generate-notes