Neon-Vision-Editor/.github/workflows/pre-release-ci.yml

65 lines
2 KiB
YAML

name: Pre-release CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
preflight:
runs-on: macos-15
steps:
- name: Checkout repository
env:
REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REF: ${{ github.sha }}
run: |
set -euo pipefail
git init
git remote add origin "https://x-access-token:${GH_TOKEN}@github.com/${REPO}.git"
git fetch --depth=1 origin "$REF"
git checkout FETCH_HEAD
- name: Select/verify Xcode 17+
run: |
set -euo pipefail
scripts/ci/select_xcode17.sh
- name: Validate basic release docs format
run: |
set -euo pipefail
if grep -nE "^- TODO$" CHANGELOG.md >/dev/null; then
echo "CHANGELOG contains TODO entries. Fill release notes before merging." >&2
exit 1
fi
grep -nE "^> Latest release: \\*\\*v[0-9]+\\.[0-9]+\\.[0-9]+(-[A-Za-z0-9.]+)?\\*\\*$" README.md >/dev/null
grep -nE "^- Latest release: \\*\\*v[0-9]+\\.[0-9]+\\.[0-9]+(-[A-Za-z0-9.]+)?\\*\\*$" README.md >/dev/null
- name: Run critical runtime tests
env:
DERIVED_DATA: ${{ runner.temp }}/DerivedData
run: |
set -euo pipefail
xcodebuild \
-project "Neon Vision Editor.xcodeproj" \
-scheme "Neon Vision Editor" \
-destination "platform=macOS" \
-derivedDataPath "$DERIVED_DATA" \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY="" \
-only-testing:"Neon Vision EditorTests/ReleaseRuntimePolicyTests" \
test
- name: Verify icon payload in built app
env:
DERIVED_DATA: ${{ runner.temp }}/DerivedData
run: |
set -euo pipefail
APP="$DERIVED_DATA/Build/Products/Debug/Neon Vision Editor.app"
scripts/ci/verify_icon_payload.sh "$APP"