-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.12 KB
/
release.yml
File metadata and controls
45 lines (37 loc) · 1.12 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
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
build-and-release:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build (Release)
run: |
DERIVED_DATA="$RUNNER_TEMP/CleanMacOSDerivedData"
xcodebuild \
-project CleanMacOS.xcodeproj \
-scheme CleanMacOS \
-configuration Release \
-destination 'platform=macOS' \
-derivedDataPath "$DERIVED_DATA" \
clean build
APP_PATH="$DERIVED_DATA/Build/Products/Release/CleanMacOS.app"
if [ ! -d "$APP_PATH" ]; then
echo "App bundle not found: $APP_PATH"
exit 1
fi
ZIP_NAME="CleanMacOS-${GITHUB_REF_NAME}.zip"
ditto -c -k --sequesterRsrc --keepParent "$APP_PATH" "$ZIP_NAME"
echo "ZIP_NAME=$ZIP_NAME" >> "$GITHUB_ENV"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ${{ env.ZIP_NAME }}
generate_release_notes: true