mirror of
https://github.com/appwrite/appwrite
synced 2026-04-21 21:47:16 +00:00
- Add COMPOSE_FILE=docker-compose.yml to tests, benchmark, and sdk-preview to prevent loading overrides in CI - Add target: development to tests/benchmark builds, target: production to pr-scan/nightly builds - Bump actions/checkout v4→v6, docker/build-push-action v4/v5→v6, actions/upload-artifact v4→v6, actions/github-script v7→v8 - Pin composer images to 2.8 in linter and static-analysis workflows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
name: "SDK Preview"
|
|
|
|
env:
|
|
COMPOSE_FILE: docker-compose.yml
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'app/config/specs/*-latest-console.json'
|
|
workflow_dispatch:
|
|
inputs:
|
|
platform:
|
|
type: choice
|
|
description: "Platform to build"
|
|
options:
|
|
- client
|
|
- server
|
|
|
|
jobs:
|
|
setup:
|
|
name: Setup & Build SDK
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set SDK type
|
|
id: set-sdk
|
|
run: |
|
|
PLATFORM="${{ github.event.inputs.platform }}"
|
|
if [ -z "$PLATFORM" ]; then
|
|
PLATFORM="console"
|
|
fi
|
|
if [ "$PLATFORM" = "server" ]; then
|
|
echo "sdk_type=nodejs" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "sdk_type=web" >> $GITHUB_OUTPUT
|
|
fi
|
|
echo "platform=$PLATFORM" >> $GITHUB_OUTPUT
|
|
|
|
- name: Load and Start Appwrite
|
|
run: |
|
|
docker compose build
|
|
docker compose up -d
|
|
docker compose exec appwrite sdks --platform=${{ steps.set-sdk.outputs.platform }} --sdk=${{ steps.set-sdk.outputs.sdk_type }} --version=latest --git=no
|
|
sudo chown -R $USER:$USER ./app/sdks/${{ steps.set-sdk.outputs.platform }}-${{ steps.set-sdk.outputs.sdk_type }}
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Build and Publish SDK
|
|
working-directory: ./app/sdks/console-web
|
|
run: |
|
|
npm install
|
|
npm run build
|
|
npx pkg-pr-new publish --comment=update
|