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
1 change: 1 addition & 0 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'v')
runs-on: windows-latest
steps:
- name: Checkout
Expand Down
237 changes: 237 additions & 0 deletions .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
name: Publish experimental macOS RC
run-name: Publish macOS v${{ inputs.release_version }}-rc.${{ inputs.rc_number }}

on:
workflow_dispatch:
inputs:
release_version:
description: Upstream Path of Building version (X.Y.Z)
required: true
default: '2.66.2'
type: string
rc_number:
description: macOS release candidate number
required: true
default: '1'
type: string
simplegraphic_tag:
description: PathOfBuilding-SimpleGraphic prerelease tag
required: true
default: issue-9-smoke-20260730
type: string
simplegraphic_commit:
description: Full commit SHA for the SimpleGraphic prerelease
required: true
default: 98e98efcc747fea5ee96dd933de51685887db417
type: string
simplegraphic_sha256:
description: SHA-256 for SimpleGraphicSmoke-macos13-arm64.zip
required: true
default: 4eb99b5d371243ea11ab02de891d6e9624f809d64e8dfc6a3cd760fc9b6a06c2
type: string
simplegraphic_windows_run_id:
description: Successful Windows CI run ID for the SimpleGraphic commit
required: true
type: string

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-latest
container: ghcr.io/pathofbuildingcommunity/pathofbuilding-tests:latest
steps:
- name: Checkout candidate
uses: actions/checkout@v4
- name: Run application tests
run: busted --lua=luajit

modcache:
runs-on: ubuntu-latest
container: ghcr.io/pathofbuildingcommunity/pathofbuilding-tests:latest
steps:
- name: Install git
run: apk add git
- name: Checkout candidate
uses: actions/checkout@v4
- name: Regenerate ModCache
env:
LUA_PATH: ../runtime/lua/?.lua;../runtime/lua/?/init.lua
REGENERATE_MOD_CACHE: 1
working-directory: src
run: luajit HeadlessWrapper.lua
- name: Check ModCache
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git diff --exit-code src/Data/ModCache.lua

publish:
needs: [tests, modcache]
runs-on: macos-15
permissions:
contents: write
env:
GH_TOKEN: ${{ github.token }}
RELEASE_VERSION: ${{ inputs.release_version }}
RC_NUMBER: ${{ inputs.rc_number }}
SIMPLEGRAPHIC_TAG: ${{ inputs.simplegraphic_tag }}
SIMPLEGRAPHIC_COMMIT: ${{ inputs.simplegraphic_commit }}
SIMPLEGRAPHIC_SHA256: ${{ inputs.simplegraphic_sha256 }}
SIMPLEGRAPHIC_WINDOWS_RUN_ID: ${{ inputs.simplegraphic_windows_run_id }}
steps:
- name: Checkout candidate
uses: actions/checkout@v4

- name: Validate release inputs
run: |
if ! printf '%s\n' "$RELEASE_VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'; then
printf 'release_version must use X.Y.Z: %s\n' "$RELEASE_VERSION" >&2
exit 2
fi
if ! printf '%s\n' "$RC_NUMBER" | grep -Eq '^[1-9][0-9]*$'; then
printf 'rc_number must be a positive integer: %s\n' "$RC_NUMBER" >&2
exit 2
fi
if ! printf '%s\n' "$SIMPLEGRAPHIC_TAG" | grep -Eq '^[A-Za-z0-9][A-Za-z0-9._-]*$'; then
printf 'invalid SimpleGraphic release tag: %s\n' "$SIMPLEGRAPHIC_TAG" >&2
exit 2
fi
if ! printf '%s\n' "$SIMPLEGRAPHIC_COMMIT" | grep -Eq '^[0-9a-f]{40}$'; then
printf 'simplegraphic_commit must be a full commit SHA\n' >&2
exit 2
fi
if ! printf '%s\n' "$SIMPLEGRAPHIC_SHA256" | grep -Eq '^[0-9a-f]{64}$'; then
printf 'simplegraphic_sha256 must be a SHA-256 digest\n' >&2
exit 2
fi
if ! printf '%s\n' "$SIMPLEGRAPHIC_WINDOWS_RUN_ID" | grep -Eq '^[1-9][0-9]*$'; then
printf 'simplegraphic_windows_run_id must be a positive integer\n' >&2
exit 2
fi

rc_version="$RELEASE_VERSION-rc.$RC_NUMBER"
tag_name="macos-v$rc_version"
source_version=$(grep -m 1 -o 'Version number="[^"]*"' manifest.xml | cut -d '"' -f 2)
if [ "$source_version" != "$RELEASE_VERSION" ]; then
printf 'release version %s does not match manifest version %s\n' "$RELEASE_VERSION" "$source_version" >&2
exit 1
fi
if gh release view "$tag_name" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
printf 'release already exists: %s\n' "$tag_name" >&2
exit 1
fi
if git ls-remote --exit-code --tags origin "refs/tags/$tag_name" >/dev/null 2>&1; then
printf 'tag already exists: %s\n' "$tag_name" >&2
exit 1
fi

runtime_repo="${GITHUB_REPOSITORY_OWNER}/PathOfBuilding-SimpleGraphic"
runtime_tag=$(gh api "repos/$runtime_repo/git/ref/tags/$SIMPLEGRAPHIC_TAG")
runtime_tag_type=$(printf '%s' "$runtime_tag" | jq -r '.object.type')
runtime_tag_commit=$(printf '%s' "$runtime_tag" | jq -r '.object.sha')
if [ "$runtime_tag_type" != 'commit' ]; then
printf 'SimpleGraphic release must use a lightweight commit tag, found %s\n' "$runtime_tag_type" >&2
exit 1
fi
if [ "$runtime_tag_commit" != "$SIMPLEGRAPHIC_COMMIT" ]; then
printf 'SimpleGraphic tag resolves to %s, expected %s\n' "$runtime_tag_commit" "$SIMPLEGRAPHIC_COMMIT" >&2
exit 1
fi
windows_run=$(gh api "repos/$runtime_repo/actions/runs/$SIMPLEGRAPHIC_WINDOWS_RUN_ID")
windows_run_commit=$(printf '%s' "$windows_run" | jq -r '.head_sha')
windows_run_result=$(printf '%s' "$windows_run" | jq -r '.status + "/" + (.conclusion // "")')
windows_run_path=$(printf '%s' "$windows_run" | jq -r '.path')
if [ "$windows_run_commit" != "$SIMPLEGRAPHIC_COMMIT" ] \
|| [ "$windows_run_result" != 'completed/success' ] \
|| [ "$windows_run_path" != '.github/workflows/main.yml' ]; then
printf 'SimpleGraphic Windows workflow is not successful for %s: %s at %s from %s\n' "$SIMPLEGRAPHIC_COMMIT" "$windows_run_result" "$windows_run_commit" "$windows_run_path" >&2
exit 1
fi
printf 'RC_VERSION=%s\n' "$rc_version" >> "$GITHUB_ENV"
printf 'TAG_NAME=%s\n' "$tag_name" >> "$GITHUB_ENV"

- name: Download SimpleGraphic runtime
run: |
mkdir -p build-macos/runtime
gh release download "$SIMPLEGRAPHIC_TAG" \
--repo "${GITHUB_REPOSITORY_OWNER}/PathOfBuilding-SimpleGraphic" \
--pattern 'SimpleGraphicSmoke-macos13-arm64.zip' \
--dir build-macos/runtime
printf '%s %s\n' \
"$SIMPLEGRAPHIC_SHA256" \
build-macos/runtime/SimpleGraphicSmoke-macos13-arm64.zip \
| shasum -a 256 -c -
ditto -x -k \
build-macos/runtime/SimpleGraphicSmoke-macos13-arm64.zip \
build-macos/runtime
test -d build-macos/runtime/SimpleGraphicSmoke.app

- name: Run SimpleGraphic acceptance smoke
run: |
build-macos/runtime/SimpleGraphicSmoke.app/Contents/MacOS/SimpleGraphicSmoke \
> build-macos/runtime-acceptance.log 2>&1

- name: Build and validate release archive
run: |
macos/package-release.sh \
build-macos/runtime/SimpleGraphicSmoke.app \
"$RC_VERSION" \
build-macos/release

- name: Prepare release notes
run: |
archive="PathOfBuilding-macOS-arm64-v$RC_VERSION.zip"
checksum=$(cut -d ' ' -f 1 "build-macos/release/$archive.sha256")
runner_version=$(sw_vers -productVersion)
windows_run_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY_OWNER/PathOfBuilding-SimpleGraphic/actions/runs/$SIMPLEGRAPHIC_WINDOWS_RUN_ID"
{
printf '%s\n' '# Experimental macOS release candidate'
printf '\n%s\n' '**Unsigned, experimental, and published from the `rodgons/PathOfBuilding` fork. This is not an official upstream Path of Building release.**'
printf '\nPath of Building %s macOS RC %s for Apple Silicon (macOS 13+).\n' "$RELEASE_VERSION" "$RC_NUMBER"
printf '\n%s\n' '## Provenance'
printf '\n- Application commit: [`%s`](%s/%s/commit/%s)\n' "$GITHUB_SHA" "$GITHUB_SERVER_URL" "$GITHUB_REPOSITORY" "$GITHUB_SHA"
printf -- '- SimpleGraphic runtime: [`%s`](https://github.com/%s/PathOfBuilding-SimpleGraphic/commit/%s), release `%s`, SHA-256 `%s`\n' "$SIMPLEGRAPHIC_COMMIT" "$GITHUB_REPOSITORY_OWNER" "$SIMPLEGRAPHIC_COMMIT" "$SIMPLEGRAPHIC_TAG" "$SIMPLEGRAPHIC_SHA256"
printf -- '- SimpleGraphic Windows CI: [successful run %s](%s)\n' "$SIMPLEGRAPHIC_WINDOWS_RUN_ID" "$windows_run_url"
printf -- '- SHA-256: `%s`\n' "$checksum"
printf '\n%s\n' '## Validation status'
printf '\nAutomated application tests, ModCache regeneration, bundle inventory, arm64/macOS 13 deployment-target and native dependency checks, archive extraction, signature verification, and unattended startup smoke passed on a GitHub-hosted Apple Silicon runner (macOS %s).\n' "$runner_version"
printf '\nPhysical Apple Silicon macOS 13 workflow validation is pending in [issue #12](https://github.com/%s/issues/12).\n' "$GITHUB_REPOSITORY"
printf '\n%s\n' '## Install'
printf '\n1. Download `%s` and `%s.sha256`.\n' "$archive" "$archive"
printf '%s\n' '2. Verify with `shasum -a 256 -c PathOfBuilding-macOS-arm64-*.zip.sha256`.'
printf '%s\n' '3. Extract the zip and move `Path of Building (macOS RC).app` to Applications.'
printf '%s\n' '4. Control-click the app and choose **Open**. If macOS still blocks it, use **System Settings > Privacy & Security > Open Anyway**.'
printf '\nTo update manually, replace the `.app`; builds and settings remain in `~/Library/Application Support/Path of Building/`.\n'
printf '\n%s\n' '## Known limitations'
printf '\n%s\n' '- The app is ad-hoc signed, not Developer ID signed or notarized.'
printf '%s\n' "- In-app self-update is disabled; **Get macOS RC Updates** opens this fork's releases."
printf '%s\n' '- SimpleGraphic runtime validation on physical macOS 13 and the full planner workflow checklist remain pending.'
printf '%s\n' '- Native host logs are currently suppressed instead of being redirected to `~/Library/Logs/Path of Building/`.'
} > build-macos/release/release-notes.md

- name: Publish prerelease
run: |
archive="PathOfBuilding-macOS-arm64-v$RC_VERSION.zip"
gh release create "$TAG_NAME" \
"build-macos/release/$archive" \
"build-macos/release/$archive.sha256" \
"build-macos/release/automated-validation.log" \
"build-macos/runtime-acceptance.log" \
--repo "$GITHUB_REPOSITORY" \
--target "$GITHUB_SHA" \
--title "Experimental macOS RC $RC_NUMBER for Path of Building $RELEASE_VERSION" \
--notes-file build-macos/release/release-notes.md \
--prerelease

- name: Upload validation evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: macos-rc-evidence-v${{ inputs.release_version }}-rc.${{ inputs.rc_number }}
if-no-files-found: ignore
path: |
build-macos/release/*.sha256
build-macos/release/automated-validation.log
build-macos/release/release-notes.md
build-macos/runtime-acceptance.log
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ src/luacov.stats.out

# Release
manifest-updated.xml
build-macos/

# GGPK Export
src/Export/ggpk/metadata/
Expand All @@ -38,4 +39,4 @@ src/Data/TimelessJewelData/*.bin
runtime/imgui.ini
runtime/SimpleGraphic/SimpleGraphic.log

src/poe_api_response.json
src/poe_api_response.json
29 changes: 29 additions & 0 deletions macos/Info.plist.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- cspell:ignore rodgons OSRC -->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Path of Building (macOS RC)</string>
<key>CFBundleExecutable</key>
<string>Path of Building</string>
<key>CFBundleIdentifier</key>
<string>com.github.rodgons.PathOfBuildingMacOSRC</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Path of Building (macOS RC)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@BUILD_VERSION@</string>
<key>CFBundleVersion</key>
<string>@BUILD_VERSION@</string>
<key>LSMinimumSystemVersion</key>
<string>13.0</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
Loading
Loading