-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (91 loc) · 3.52 KB
/
Copy pathrelease.yml
File metadata and controls
103 lines (91 loc) · 3.52 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
name: Release
# Build a Release DMG and publish a GitHub Release whenever main advances.
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: release-main
cancel-in-progress: true
permissions:
contents: write
jobs:
release:
name: Build and release
runs-on: macos-26
steps:
- name: Checkout
# v5+ runs on Node 24 (avoids the Node 20 deprecation warning).
uses: actions/checkout@v5
- name: Select Xcode
run: |
# Prefer the image default; fall back to any installed Xcode 26.
if [ -d /Applications/Xcode.app ]; then
sudo xcode-select -s /Applications/Xcode.app
else
latest=$(ls -d /Applications/Xcode_26*.app 2>/dev/null | sort -V | tail -1)
if [ -z "$latest" ]; then
echo "No Xcode 26 found on runner"
exit 1
fi
sudo xcode-select -s "$latest"
fi
xcodebuild -version
- name: Install XcodeGen
run: |
# Install from GitHub releases instead of Homebrew.
# Runner images preinstall third-party taps (aws/tap, azure/bicep, …) that
# either warn under Homebrew tap-trust or refuse `brew untap` while formulae
# from those taps are still installed.
curl -fsSL -o /tmp/xcodegen.zip \
https://github.com/yonaskolb/XcodeGen/releases/latest/download/xcodegen.zip
rm -rf /tmp/xcodegen
unzip -q /tmp/xcodegen.zip -d /tmp/xcodegen
# Archive layout is either a bare binary or a folder containing it.
bin=$(find /tmp/xcodegen -type f -name xcodegen | head -1)
if [ -z "$bin" ]; then
echo "xcodegen binary not found in release archive"
find /tmp/xcodegen -maxdepth 3 -print
exit 1
fi
mkdir -p "$HOME/.local/bin"
install -m 755 "$bin" "$HOME/.local/bin/xcodegen"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
"$HOME/.local/bin/xcodegen" --version
- name: Build Release DMG
run: |
chmod +x scripts/*.sh
./scripts/release.sh
- name: Resolve version and tag
id: meta
run: |
VERSION=$(grep 'MARKETING_VERSION:' project.yml | head -1 | sed 's/.*"\(.*\)".*/\1/')
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
TAG="v${VERSION}-${{ github.run_number }}+${SHORT_SHA}"
{
echo "version=${VERSION}"
echo "tag=${TAG}"
echo "title=HyperDock v${VERSION} (${SHORT_SHA})"
} >> "$GITHUB_OUTPUT"
ls -lh dist/HyperDock.dmg
echo "Release tag: ${TAG}"
- name: Publish GitHub Release
# v3 runs on Node 24 (avoids the Node 20 deprecation warning).
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ steps.meta.outputs.tag }}
name: ${{ steps.meta.outputs.title }}
files: dist/HyperDock.dmg
fail_on_unmatched_files: true
generate_release_notes: true
body: |
Automated Release build from `main`.
| | |
|---|---|
| **Version** | ${{ steps.meta.outputs.version }} |
| **Commit** | ${{ github.sha }} |
| **Artifact** | `HyperDock.dmg` |
> Built on GitHub-hosted macOS with ad-hoc signing unless a Developer ID
> identity is available on the runner. Recipients may need to clear quarantine:
> `xattr -d com.apple.quarantine /path/to/HyperDock.dmg`