-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (66 loc) · 2.29 KB
/
Copy pathrelease.yml
File metadata and controls
74 lines (66 loc) · 2.29 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
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
# Build release artifacts with the SDK that contains Liquid Glass and Icon Composer.
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- name: Verify Xcode 26 toolchain
shell: bash
run: |
set -euo pipefail
xcode_version="$(xcodebuild -version)"
printf '%s\n' "$xcode_version"
grep -Eq '^Xcode 26[.]' <<< "$xcode_version"
- name: Validate tag and app version
shell: bash
run: |
set -euo pipefail
tag_version="${GITHUB_REF_NAME#v}"
app_version=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' OverflowBar/Resources/Info.plist)
if [[ "$tag_version" == *-macos27-compat.* ]]; then
base_version="${tag_version%%-macos27-*}"
test "$base_version" = "$app_version"
else
test "$tag_version" = "$app_version"
fi
plutil -lint OverflowBar/Resources/Info.plist
bash -n scripts/create-dmg.sh
if [[ "$tag_version" != *-macos27-compat.* ]]; then
bash scripts/validate-homebrew-cask.sh
fi
- name: Build release DMG
run: VERSION="${GITHUB_REF_NAME#v}" ./scripts/create-dmg.sh
- name: Verify release artifacts
shell: bash
run: |
set -euo pipefail
version="${GITHUB_REF_NAME#v}"
hdiutil verify "dist/OverflowBar-${version}.dmg"
(cd dist && shasum -a 256 -c "OverflowBar-${version}.dmg.sha256")
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
set -euo pipefail
version="${GITHUB_REF_NAME#v}"
notes_file="RELEASE_NOTES.md"
release_args=()
if [[ "$version" == *-macos27-compat.* ]]; then
notes_file="RELEASE_NOTES_MACOS27.md"
release_args+=(--prerelease)
fi
gh release create "${GITHUB_REF_NAME}" \
"dist/OverflowBar-${version}.dmg" \
"dist/OverflowBar-${version}.dmg.sha256" \
--title "OverflowBar ${version}" \
--notes-file "$notes_file" \
"${release_args[@]}" \
--verify-tag