Skip to content

Commit 7ef3c97

Browse files
Merge pull request #845 from appwrite/feat-remove-travis
Publish SDKs with GitHub actions
2 parents b44b074 + bea6e0a commit 7ef3c97

33 files changed

+183
-119
lines changed

.github/workflows/tests.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,40 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
php-version: ['8.2']
16-
sdk: [Android5Java17, Android14Java17, CLINode16, CLINode18, DartBeta, DartStable, Deno1193, Deno1303, DotNet60, DotNet70, FlutterStable, FlutterBeta, Go112, Go118, KotlinJava8, KotlinJava11, KotlinJava17, Node16, Node18, Node20, PHP74, PHP80, Python38, Python39, Python310, Ruby27, Ruby30, Ruby31, AppleSwift56, Swift56, WebChromium, WebNode]
16+
sdk: [
17+
Android5Java17,
18+
Android14Java17,
19+
CLINode16,
20+
CLINode18,
21+
DartBeta,
22+
DartStable,
23+
Deno1193,
24+
Deno1303,
25+
DotNet60,
26+
DotNet80,
27+
FlutterStable,
28+
FlutterBeta,
29+
Go112,
30+
Go118,
31+
KotlinJava8,
32+
KotlinJava11,
33+
KotlinJava17,
34+
Node16,
35+
Node18,
36+
Node20,
37+
PHP74,
38+
PHP80,
39+
Python38,
40+
Python39,
41+
Python310,
42+
Ruby27,
43+
Ruby30,
44+
Ruby31,
45+
AppleSwift56,
46+
Swift56,
47+
WebChromium,
48+
WebNode
49+
]
1750

1851
steps:
1952
- name: Checkout repository

mock-server/docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
mockapi:
53
container_name: mockapi

src/SDK/Language/DotNet.php

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ public function getFiles(): array
303303
return [
304304
[
305305
'scope' => 'default',
306-
'destination' => '.travis.yml',
307-
'template' => 'dotnet/.travis.yml.twig',
306+
'destination' => '.github/workflows/publish.yml',
307+
'template' => 'dotnet/.github/workflows/publish.yml.twig',
308308
],
309309
[
310310
'scope' => 'default',
@@ -333,93 +333,93 @@ public function getFiles(): array
333333
],
334334
[
335335
'scope' => 'default',
336-
'destination' => '/src/{{ spec.title | caseUcfirst }}.sln',
337-
'template' => 'dotnet/src/Appwrite.sln',
336+
'destination' => '{{ spec.title | caseUcfirst }}.sln',
337+
'template' => 'dotnet/Package.sln',
338338
],
339339
[
340340
'scope' => 'default',
341-
'destination' => '/src/{{ spec.title | caseUcfirst }}/{{ spec.title | caseUcfirst }}.csproj',
342-
'template' => 'dotnet/src/Appwrite/Appwrite.csproj.twig',
341+
'destination' => '{{ spec.title | caseUcfirst }}/{{ spec.title | caseUcfirst }}.csproj',
342+
'template' => 'dotnet/Package/Package.csproj.twig',
343343
],
344344
[
345345
'scope' => 'default',
346-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Client.cs',
347-
'template' => 'dotnet/src/Appwrite/Client.cs.twig',
346+
'destination' => '{{ spec.title | caseUcfirst }}/Client.cs',
347+
'template' => 'dotnet/Package/Client.cs.twig',
348348
],
349349
[
350350
'scope' => 'default',
351-
'destination' => '/src/{{ spec.title | caseUcfirst }}/{{ spec.title | caseUcfirst }}Exception.cs',
352-
'template' => 'dotnet/src/Appwrite/Exception.cs.twig',
351+
'destination' => '{{ spec.title | caseUcfirst }}/{{ spec.title | caseUcfirst }}Exception.cs',
352+
'template' => 'dotnet/Package/Exception.cs.twig',
353353
],
354354
[
355355
'scope' => 'default',
356-
'destination' => '/src/{{ spec.title | caseUcfirst }}/ID.cs',
357-
'template' => 'dotnet/src/Appwrite/ID.cs.twig',
356+
'destination' => '{{ spec.title | caseUcfirst }}/ID.cs',
357+
'template' => 'dotnet/Package/ID.cs.twig',
358358
],
359359
[
360360
'scope' => 'default',
361-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Permission.cs',
362-
'template' => 'dotnet/src/Appwrite/Permission.cs.twig',
361+
'destination' => '{{ spec.title | caseUcfirst }}/Permission.cs',
362+
'template' => 'dotnet/Package/Permission.cs.twig',
363363
],
364364
[
365365
'scope' => 'default',
366-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Query.cs',
367-
'template' => 'dotnet/src/Appwrite/Query.cs.twig',
366+
'destination' => '{{ spec.title | caseUcfirst }}/Query.cs',
367+
'template' => 'dotnet/Package/Query.cs.twig',
368368
],
369369
[
370370
'scope' => 'default',
371-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Role.cs',
372-
'template' => 'dotnet/src/Appwrite/Role.cs.twig',
371+
'destination' => '{{ spec.title | caseUcfirst }}/Role.cs',
372+
'template' => 'dotnet/Package/Role.cs.twig',
373373
],
374374
[
375375
'scope' => 'default',
376-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Converters/ValueClassConverter.cs',
377-
'template' => 'dotnet/src/Appwrite/Converters/ValueClassConverter.cs.twig',
376+
'destination' => '{{ spec.title | caseUcfirst }}/Converters/ValueClassConverter.cs',
377+
'template' => 'dotnet/Package/Converters/ValueClassConverter.cs.twig',
378378
],
379379
[
380380
'scope' => 'default',
381-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Extensions/Extensions.cs',
382-
'template' => 'dotnet/src/Appwrite/Extensions/Extensions.cs.twig',
381+
'destination' => '{{ spec.title | caseUcfirst }}/Extensions/Extensions.cs',
382+
'template' => 'dotnet/Package/Extensions/Extensions.cs.twig',
383383
],
384384
[
385385
'scope' => 'default',
386-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Models/OrderType.cs',
387-
'template' => 'dotnet/src/Appwrite/Models/OrderType.cs.twig',
386+
'destination' => '{{ spec.title | caseUcfirst }}/Models/OrderType.cs',
387+
'template' => 'dotnet/Package/Models/OrderType.cs.twig',
388388
],
389389
[
390390
'scope' => 'default',
391-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Models/UploadProgress.cs',
392-
'template' => 'dotnet/src/Appwrite/Models/UploadProgress.cs.twig',
391+
'destination' => '{{ spec.title | caseUcfirst }}/Models/UploadProgress.cs',
392+
'template' => 'dotnet/Package/Models/UploadProgress.cs.twig',
393393
],
394394
[
395395
'scope' => 'default',
396-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Models/InputFile.cs',
397-
'template' => 'dotnet/src/Appwrite/Models/InputFile.cs.twig',
396+
'destination' => '{{ spec.title | caseUcfirst }}/Models/InputFile.cs',
397+
'template' => 'dotnet/Package/Models/InputFile.cs.twig',
398398
],
399399
[
400400
'scope' => 'default',
401-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Services/Service.cs',
402-
'template' => 'dotnet/src/Appwrite/Services/Service.cs.twig',
401+
'destination' => '{{ spec.title | caseUcfirst }}/Services/Service.cs',
402+
'template' => 'dotnet/Package/Services/Service.cs.twig',
403403
],
404404
[
405405
'scope' => 'service',
406-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Services/{{service.name | caseUcfirst}}.cs',
407-
'template' => 'dotnet/src/Appwrite/Services/ServiceTemplate.cs.twig',
406+
'destination' => '{{ spec.title | caseUcfirst }}/Services/{{service.name | caseUcfirst}}.cs',
407+
'template' => 'dotnet/Package/Services/ServiceTemplate.cs.twig',
408408
],
409409
[
410410
'scope' => 'definition',
411-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Models/{{ definition.name | caseUcfirst | overrideIdentifier }}.cs',
412-
'template' => 'dotnet/src/Appwrite/Models/Model.cs.twig',
411+
'destination' => '{{ spec.title | caseUcfirst }}/Models/{{ definition.name | caseUcfirst | overrideIdentifier }}.cs',
412+
'template' => 'dotnet/Package/Models/Model.cs.twig',
413413
],
414414
[
415415
'scope' => 'enum',
416-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Enums/{{ enum.name | caseUcfirst | overrideIdentifier }}.cs',
417-
'template' => 'dotnet/src/Appwrite/Enums/Enum.cs.twig',
416+
'destination' => '{{ spec.title | caseUcfirst }}/Enums/{{ enum.name | caseUcfirst | overrideIdentifier }}.cs',
417+
'template' => 'dotnet/Package/Enums/Enum.cs.twig',
418418
],
419419
[
420420
'scope' => 'default',
421-
'destination' => '/src/{{ spec.title | caseUcfirst }}/Enums/IEnum.cs',
422-
'template' => 'dotnet/src/Appwrite/Enums/IEnum.cs.twig',
421+
'destination' => '{{ spec.title | caseUcfirst }}/Enums/IEnum.cs',
422+
'template' => 'dotnet/Package/Enums/IEnum.cs.twig',
423423
]
424424
];
425425
}

src/SDK/Language/Python.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ public function getFiles(): array
202202
],
203203
[
204204
'scope' => 'default',
205-
'destination' => '.travis.yml',
206-
'template' => 'python/.travis.yml.twig',
205+
'destination' => '.github/workflows/publish.yml',
206+
'template' => 'python/.github/workflows/publish.yml.twig',
207207
],
208208
[
209209
'scope' => 'enum',

src/SDK/Language/Ruby.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ public function getFiles(): array
174174
],
175175
[
176176
'scope' => 'default',
177-
'destination' => '.travis.yml',
178-
'template' => 'ruby/.travis.yml.twig',
177+
'destination' => '.github/workflows/publish.yml',
178+
'template' => 'ruby/.github/workflows/publish.yml.twig',
179179
],
180180
[
181181
'scope' => 'definition',
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to RubyGems
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
name: Release build and publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up .NET
15+
uses: actions/setup-dotnet@v4
16+
with:
17+
dotnet-version: '6'
18+
19+
- name: Install dependencies
20+
run: dotnet restore
21+
22+
- name: Build nuget
23+
run: |
24+
dotnet build -c Release
25+
dotnet pack -c Release
26+
27+
- name: Publish nuget
28+
run: |
29+
dotnet nuget push ./Appwrite/bin/Release/*.nupkg \
30+
--api-key {{ '${{ secrets.NUGET_TOKEN }}' }} \
31+
--source https://api.nuget.org/v3/index.json

templates/dotnet/.travis.yml.twig

Lines changed: 0 additions & 24 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)