Author SHA1 Message Date
niklasandClaude Opus 5.5 d3ea638f0a Build and publish Gitea releases from version tags
Build / build (pull_request) Successful in 10s
Tags like 1.0 or v1.0 set MARKETING_VERSION, and the zipped app is
attached to a Gitea release for that tag (created if missing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:57:37 +02:00
niklasandClaude Opus 5.5 3b15042882 Add Gitea workflow to build the macOS app
Build / build (pull_request) Failing after 3s
Builds a Release, ad-hoc signed app on the macos-arm64 runner and
uploads it as a zipped artifact. Also fixes INFOPLIST_FILE, which
pointed at a nonexistent MyApp/Info.plist and broke every build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:16:12 +02:00
2 changed files with 105 additions and 1 deletions
+104
View File
@@ -0,0 +1,104 @@
name: Build
on:
push:
branches: [main]
# Release tags, e.g. 1.0, 1.2.3 or v1.0
tags: ["v[0-9]*", "[0-9]*"]
pull_request:
workflow_dispatch:
jobs:
build:
# Must match a label registered on your macOS act_runner (host mode).
runs-on: macos-arm64
env:
PROJECT: proxy studio.xcodeproj
TARGET: proxy studio
APP_NAME: Proxy Studio
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Show toolchain
run: |
xcode-select -p
xcodebuild -version
- name: Determine version
run: |
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
VERSION="${GITHUB_REF_NAME#v}"
else
VERSION="0.0.0-${GITHUB_SHA::7}"
fi
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
echo "ZIP_NAME=ProxyStudio-$VERSION.zip" >> "$GITHUB_ENV"
echo "Version: $VERSION"
- name: Build
run: |
set -o pipefail
# MARKETING_VERSION only accepts dotted numbers, so dev builds keep the project default.
VERSION_SETTINGS=()
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
VERSION_SETTINGS+=(MARKETING_VERSION="$VERSION")
fi
xcodebuild build \
-project "$PROJECT" \
-target "$TARGET" \
-configuration Release \
SYMROOT="$PWD/build" \
CODE_SIGN_STYLE=Manual \
CODE_SIGN_IDENTITY=- \
DEVELOPMENT_TEAM= \
CURRENT_PROJECT_VERSION="$GITHUB_RUN_NUMBER" \
"${VERSION_SETTINGS[@]}" \
| tee xcodebuild.log
- name: Package
run: |
cd build/Release
ditto -c -k --keepParent "$APP_NAME.app" "$GITHUB_WORKSPACE/$ZIP_NAME"
- uses: actions/upload-artifact@v4
with:
name: ProxyStudio-${{ env.VERSION }}
path: ${{ env.ZIP_NAME }}
- name: Publish release
if: github.ref_type == 'tag'
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
run: |
set -euo pipefail
auth=(-H "Authorization: token $TOKEN")
# Reuse the release if it was created in the Gitea UI, otherwise create it.
release_id=$(curl -sf "${auth[@]}" "$API/releases/tags/$GITHUB_REF_NAME" | jq -r .id || true)
if [ -z "$release_id" ] || [ "$release_id" = "null" ]; then
release_id=$(curl -sf "${auth[@]}" -H "Content-Type: application/json" \
-d "$(jq -n --arg tag "$GITHUB_REF_NAME" --arg name "$APP_NAME $VERSION" \
'{tag_name: $tag, name: $name}')" \
"$API/releases" | jq -r .id)
fi
# Replace an existing asset of the same name (e.g. when re-running the job).
existing=$(curl -sf "${auth[@]}" "$API/releases/$release_id/assets" \
| jq -r --arg n "$ZIP_NAME" '.[] | select(.name == $n) | .id')
for id in $existing; do
curl -sf -X DELETE "${auth[@]}" "$API/releases/$release_id/assets/$id"
done
curl -sf "${auth[@]}" -F "attachment=@$ZIP_NAME" \
"$API/releases/$release_id/assets?name=$ZIP_NAME" > /dev/null
echo "Uploaded $ZIP_NAME to release $GITHUB_REF_NAME"
- uses: actions/upload-artifact@v4
if: failure()
with:
name: xcodebuild-log
path: xcodebuild.log
+1 -1
View File
@@ -62,7 +62,7 @@
"ENABLE_RESOURCE_ACCESS_USB": "NO",
"ENABLE_USER_SELECTED_FILES": "readonly",
"GENERATE_INFOPLIST_FILE": "YES",
"INFOPLIST_FILE": "MyApp/Info.plist",
"INFOPLIST_FILE": "proxy studio/Info.plist",
"INFOPLIST_KEY_CFBundleDisplayName": "Proxy Studio",
"INFOPLIST_KEY_LSApplicationCategoryType": "public.app-category.developer-tools",
"INFOPLIST_KEY_NSLocalNetworkUsageDescription": "Proxy Studio connects to your Nginx Proxy Manager and UniFi gateways to manage proxy hosts, certificates, and DNS records.",