Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ jobs:
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Test
run: dotnet test --verbosity normal
# Before the tests, so it runs on an unrestored checkout as the release job does.
- name: Build the macOS app
run: packaging/macos/build-mac-app.sh --no-dmg
- name: Test
run: dotnet test --verbosity normal
- name: Check the app bundle
run: |
app="artifacts/macos/KSP2 Redux.app"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build and Release
on:
push:
branches: [ "main" ]
# Rebuilds the macOS assets for a release that already exists, when the macOS job failed after publishing.
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -109,12 +111,12 @@ jobs:
# the macOS asset names contain neither.
macos-runtime:
needs: build
if: needs.build.outputs.tag_exists == 'false'
if: needs.build.outputs.tag_exists == 'false' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/macos-runtime.yml

macos:
needs: [ build, macos-runtime ]
if: needs.build.outputs.tag_exists == 'false'
if: needs.build.outputs.tag_exists == 'false' || github.event_name == 'workflow_dispatch'
runs-on: macos-15
permissions:
contents: write
Expand Down Expand Up @@ -155,6 +157,10 @@ jobs:
dxmt="$(jq -r .dxmt <<< "$runtime_json")"

notes="$(gh release view "$TAG" --json body --jq .body)"
if grep -q '^### macOS runtime' <<< "$notes"; then
echo "The release notes already have the macOS section."
exit 0
fi
{
printf '%s\n\n' "$notes"
printf '### macOS\n\n'
Expand Down
2 changes: 1 addition & 1 deletion packaging/macos/build-mac-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ while [ $# -gt 0 ]; do
done

echo "==> Building the launcher .app ($RID)"
dotnet msbuild "$PROJECT" -t:BundleApp -p:RuntimeIdentifier="$RID" -p:Configuration=Release \
dotnet msbuild "$PROJECT" -restore -t:BundleApp -p:RuntimeIdentifier="$RID" -p:Configuration=Release \
-p:SelfContained=true -p:PublishSingleFile=false -v:minimal -nologo

PUBLISH_DIR="$REPO_ROOT/src/Ksp2Redux.Tools.Launcher/bin/Release/net10.0/$RID/publish"
Expand Down
Loading