add update

This commit is contained in:
2025-10-12 19:10:34 +08:00
parent b9c900b9b1
commit 32f1e5bb33
6 changed files with 2308 additions and 1 deletions

View File

@@ -0,0 +1,62 @@
# .woodpecker.yml (macOS Local Agent)
labels:
host: Mac-mini.local
platform: darwin/arm64
when:
event: [push, manual]
steps:
- name: build-app
image: /bin/zsh
commands:
- echo "Building on macOS..."
- mkdir -p build/output
- echo "Binary placeholder" > build/output/app
- echo "Config file" > build/output/config.json
- ls -R build/
- name: upload-single-file
image: /bin/zsh
environment:
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: AWS_SECRET_ACCESS_KEY
S3_BUCKET:
from_secret: S3_BUCKET
S3_ENDPOINT:
from_secret: S3_ENDPOINT
commands:
- |
echo "📦 Uploading config file..."
export PLUGIN_SOURCE="build/output/config.json"
export PLUGIN_BUCKET="$S3_BUCKET"
export PLUGIN_TARGET="configs/"
export PLUGIN_ENDPOINT="$S3_ENDPOINT"
export PLUGIN_PATH_STYLE=true
plugin-s3
echo "✅ Config uploaded"
- name: upload-build-folder
image: /bin/zsh
environment:
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: AWS_SECRET_ACCESS_KEY
S3_BUCKET:
from_secret: S3_BUCKET
S3_ENDPOINT:
from_secret: S3_ENDPOINT
commands:
- |
echo "📦 Uploading entire build folder..."
export PLUGIN_SOURCE="build/output/**/*"
export PLUGIN_BUCKET="$S3_BUCKET"
export PLUGIN_TARGET="builds/macos-$(date +%Y%m%d-%H%M%S)/"
export PLUGIN_ENDPOINT="$S3_ENDPOINT"
export PLUGIN_PATH_STYLE=true
export PLUGIN_STRIP_PREFIX="build/output/"
plugin-s3
echo "✅ Build folder uploaded"