mirror of
https://github.com/h3pdesign/Neon-Vision-Editor
synced 2026-05-02 18:37:17 +00:00
76 lines
2.5 KiB
YAML
76 lines
2.5 KiB
YAML
name: Release macOS app (unsigned)
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout (no external actions)
|
|
env:
|
|
TAG_NAME: ${{ github.ref_name }}
|
|
REPO: ${{ github.repository }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git init
|
|
git remote add origin "https://x-access-token:${GH_TOKEN}@github.com/${REPO}.git"
|
|
git fetch --depth=1 origin "refs/tags/${TAG_NAME}"
|
|
git checkout -b "release-${TAG_NAME}" FETCH_HEAD
|
|
|
|
- name: Show Xcode Version
|
|
run: xcodebuild -version
|
|
|
|
- name: Build macOS archive
|
|
env:
|
|
ARCHIVE_PATH: ${{ runner.temp }}/NeonVisionEditor.xcarchive
|
|
run: |
|
|
xcodebuild \
|
|
-project "Neon Vision Editor.xcodeproj" \
|
|
-scheme "Neon Vision Editor" \
|
|
-configuration Release \
|
|
-destination "generic/platform=macOS" \
|
|
-archivePath "$ARCHIVE_PATH" \
|
|
MACOSX_DEPLOYMENT_TARGET=15.5 \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGN_IDENTITY="" \
|
|
DEVELOPMENT_TEAM="" \
|
|
archive
|
|
|
|
- name: Zip app
|
|
env:
|
|
ARCHIVE_PATH: ${{ runner.temp }}/NeonVisionEditor.xcarchive
|
|
run: |
|
|
APP_PATH="$ARCHIVE_PATH/Products/Applications/Neon Vision Editor.app"
|
|
if [[ ! -d "$APP_PATH" ]]; then
|
|
echo "App not found at $APP_PATH" >&2
|
|
exit 1
|
|
fi
|
|
ditto -c -k --sequesterRsrc --keepParent "$APP_PATH" "Neon.Vision.Editor.app.zip"
|
|
|
|
- name: Extract changelog section
|
|
env:
|
|
TAG_NAME: ${{ github.ref_name }}
|
|
run: |
|
|
./scripts/extract_changelog_section.sh CHANGELOG.md "$TAG_NAME" > release-notes.md
|
|
|
|
- name: Create or Update GitHub Release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAG_NAME: ${{ github.ref_name }}
|
|
run: |
|
|
if gh release view "$TAG_NAME" >/dev/null 2>&1; then
|
|
gh release upload "$TAG_NAME" "Neon.Vision.Editor.app.zip" --clobber
|
|
gh release edit "$TAG_NAME" --title "Neon Vision Editor $TAG_NAME" --notes-file release-notes.md
|
|
else
|
|
gh release create "$TAG_NAME" \
|
|
--title "Neon Vision Editor $TAG_NAME" \
|
|
--notes-file release-notes.md \
|
|
"Neon.Vision.Editor.app.zip"
|
|
fi
|