WIP: feat(workflows): add new build workflows for Windows, Linux, and macOS, and remove obsolete build scripts #17

Draft
m wants to merge 141 commits from ozgur/build into main
Showing only changes of commit 125611cdd1 - Show all commits

View File

@ -1,21 +1,9 @@
name: Test macOS Signing name: Test macOS Signing
on: on:
workflow_dispatch: # push:
inputs: branches: [ozgur/build]
use_previous_build: workflow_dispatch: # Manual trigger de mümkün olsun
description: 'Use a previous successful build artifact instead of local app path'
required: true
type: boolean
default: false
app_path:
description: 'Path to the app bundle to sign (if not using artifact)'
required: false
default: 'Builds/Mac/LuckyRobots.app'
artifact_run_id:
description: 'Run ID of the workflow that produced the artifact to use (if using artifact)'
required: false
default: ''
jobs: jobs:
test-signing: test-signing:
@ -27,37 +15,21 @@ jobs:
lfs: true lfs: true
fetch-depth: 0 fetch-depth: 0
- name: Download Previous Build - name: Download Artifact
if: ${{ github.event.inputs.use_previous_build == 'true' }}
run: | run: |
# Create directories # Create directories
mkdir -p Builds/Mac mkdir -p Builds/Mac
# Download artifact (using GitHub API or direct download) # Download specific artifact
echo "Downloading previous build artifact..." echo "Downloading build artifact..."
# If artifact_run_id is provided, use it # Sabit artifact URL kullan
if [[ -n "${{ github.event.inputs.artifact_run_id }}" ]]; then ARTIFACT_URL="https://luckyrobots.com/LuckyRobots/LuckyWorld/actions/runs/84/artifacts/LuckyRobots-macOS"
RUN_ID="${{ github.event.inputs.artifact_run_id }}"
else
# Get latest successful build run ID
echo "No specific run ID provided, finding latest successful build..."
# You'll need to have proper authentication to access the API echo "Using artifact URL: $ARTIFACT_URL"
# This is simplified, you might need to adjust based on your setup
RUN_ID=$(curl -s "https://luckyrobots.com/api/v1/repos/luckyrobots/luckyworld/actions/runs?status=success&event=push" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
if [[ -z "$RUN_ID" ]]; then # Download the artifact
echo "Could not find a successful run ID. Please specify one manually." curl -L "$ARTIFACT_URL" -o build.zip
exit 1
fi
fi
echo "Using run ID: $RUN_ID"
# Download artifact using your Gitea API
# This is a simplified example - adjust as needed for your actual API
curl -L "https://luckyrobots.com/luckyrobots/luckyworld/actions/runs/$RUN_ID/artifacts/LuckyRobots-macOS" -o build.zip
# Extract to Builds directory # Extract to Builds directory
unzip -o build.zip -d Builds/Mac/ unzip -o build.zip -d Builds/Mac/
@ -77,20 +49,10 @@ jobs:
- name: Validate App Path - name: Validate App Path
id: validate-app id: validate-app
run: | run: |
if [[ "${{ github.event.inputs.use_previous_build }}" == "true" ]]; then
APP_PATH="$app_path" APP_PATH="$app_path"
else
APP_PATH="${{ github.event.inputs.app_path }}"
fi
if [ ! -d "$APP_PATH" ]; then if [ ! -d "$APP_PATH" ]; then
echo "Error: Application path does not exist: $APP_PATH" echo "Error: Application path does not exist: $APP_PATH"
echo "You can download a previous successful build artifact or specify a different path"
# List available directories to help user
echo "Available directories in workspace:"
find . -type d -maxdepth 3 | grep -v "node_modules\|.git"
exit 1 exit 1
fi fi