-
Notifications
You must be signed in to change notification settings - Fork 5.3k
54 lines (48 loc) · 1.52 KB
/
sdk-preview.yml
File metadata and controls
54 lines (48 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: "SDK Preview"
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@v4
- 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