fix(workflows): simplify macOS signing workflow by removing previous build input options and using a fixed artifact URL
This commit is contained in:
parent
6ed4a8f9d1
commit
125611cdd1
@ -1,21 +1,9 @@
|
||||
name: Test macOS Signing
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
use_previous_build:
|
||||
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: ''
|
||||
# push:
|
||||
branches: [ozgur/build]
|
||||
workflow_dispatch: # Manual trigger de mümkün olsun
|
||||
|
||||
jobs:
|
||||
test-signing:
|
||||
@ -27,37 +15,21 @@ jobs:
|
||||
lfs: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download Previous Build
|
||||
if: ${{ github.event.inputs.use_previous_build == 'true' }}
|
||||
- name: Download Artifact
|
||||
run: |
|
||||
# Create directories
|
||||
mkdir -p Builds/Mac
|
||||
|
||||
# Download artifact (using GitHub API or direct download)
|
||||
echo "Downloading previous build artifact..."
|
||||
# Download specific artifact
|
||||
echo "Downloading build artifact..."
|
||||
|
||||
# If artifact_run_id is provided, use it
|
||||
if [[ -n "${{ github.event.inputs.artifact_run_id }}" ]]; then
|
||||
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
|
||||
# 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
|
||||
echo "Could not find a successful run ID. Please specify one manually."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# Sabit artifact URL kullan
|
||||
ARTIFACT_URL="https://luckyrobots.com/LuckyRobots/LuckyWorld/actions/runs/84/artifacts/LuckyRobots-macOS"
|
||||
|
||||
echo "Using run ID: $RUN_ID"
|
||||
echo "Using artifact URL: $ARTIFACT_URL"
|
||||
|
||||
# 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
|
||||
# Download the artifact
|
||||
curl -L "$ARTIFACT_URL" -o build.zip
|
||||
|
||||
# Extract to Builds directory
|
||||
unzip -o build.zip -d Builds/Mac/
|
||||
@ -77,20 +49,10 @@ jobs:
|
||||
- name: Validate App Path
|
||||
id: validate-app
|
||||
run: |
|
||||
if [[ "${{ github.event.inputs.use_previous_build }}" == "true" ]]; then
|
||||
APP_PATH="$app_path"
|
||||
else
|
||||
APP_PATH="${{ github.event.inputs.app_path }}"
|
||||
fi
|
||||
APP_PATH="$app_path"
|
||||
|
||||
if [ ! -d "$APP_PATH" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user