Repository navigation
104 lines (89 loc) · 4.19 KB
/
Copy pathrelease.yml
File metadata and controls
104 lines (89 loc) · 4.19 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
name: Release macOS App
# Builds AssetStudio.Maui and publishes it as a GitHub Release.
#
# Trigger a release by pushing a tag:
# git tag -a v1.0.1 -m "v1.0.1"
# git push origin v1.0.1
#
# Or run it manually from the Actions tab (workflow_dispatch) without creating a
# release - useful to sanity-check that the build still works.
#
# Known limitation: AssetStudioFBXNative needs the proprietary Autodesk FBX SDK,
# which can't be downloaded automatically here (requires a licensed Autodesk
# account). Released builds from this workflow therefore do NOT include FBX
# export - only Texture2DDecoderNative is built in CI. If you need FBX export,
# either build locally with the SDK installed (see README "Building"), or run
# this workflow on a self-hosted runner that already has the SDK at the path
# AssetStudioFBXNative/CMakeLists.txt expects, after adding a build step for it.
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-release:
# macos-latest currently maxes out at Xcode 26.3 (macOS SDK 26.2), which is too old for
# this build (see the comment on the Xcode-selection step below). macos-26 is GitHub's
# newer runner image and ships Xcode 26.5 with the macOS 26.4/26.5 SDKs we actually need.
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
# The MacCatalyst linker step (ILLink/ManagedRegistrar) needs the MacCatalyst 26.4+ SDK -
# building with an older one fails with MT4162/IL7000 errors about APIs "introduced in
# MacCatalyst 26.4". The macos-26 image's default Xcode is already 26.5 (verified via
# actions/runner-images' macos-26-Readme.md and an actual CI run), so just select it
# directly by its real (non-symlinked) path - no need to scan every installed Xcode.
- name: Select Xcode 26.5
run: |
sudo xcode-select -s /Applications/Xcode_26.5.app/Contents/Developer
xcodebuild -version
- name: Install CMake
run: brew install cmake
- name: Build Texture2DDecoderNative (universal binary)
run: |
cmake -B Texture2DDecoderNative/build -S Texture2DDecoderNative \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake --build Texture2DDecoderNative/build --config Release
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install MAUI workload
run: dotnet workload install maui
- name: Build AssetStudio.Maui (Release)
run: dotnet build AssetStudio.Maui/AssetStudio.Maui.csproj -c Release -f net10.0-maccatalyst
- name: Package app bundle
run: |
APP_PATH=$(find AssetStudio.Maui/bin/Release/net10.0-maccatalyst -maxdepth 2 -name "*.app" | head -1)
if [ -z "$APP_PATH" ]; then
echo "Could not find a built .app bundle" >&2
exit 1
fi
ZIP_NAME="AssetStudio.Maui-${{ github.ref_name }}-macOS.zip"
ditto -c -k --sequesterRsrc --keepParent "$APP_PATH" "$ZIP_NAME"
echo "ZIP_NAME=$ZIP_NAME" >> "$GITHUB_ENV"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: AssetStudio.Maui-macOS
path: ${{ env.ZIP_NAME }}
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ env.ZIP_NAME }}
name: ${{ github.ref_name }}
generate_release_notes: true
body: |
**Note:** this CI build does not include FBX export or AudioClip playback preview -
the Autodesk FBX SDK and the FMOD Engine are both proprietary and can't be fetched
automatically in CI. Build locally with them installed (see the README's
"Building"/"Requirements" sections) if you need either feature.
The app is not code-signed with a Developer ID or notarized, so macOS
Gatekeeper will block it on first launch: right-click the app -> **Open**,
or run `xattr -cr AssetStudio.Maui.app` before launching.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}