Skip to content

Commit 613a55f

Browse files
committed
Dotnet publish with github
1 parent 0775d4c commit 613a55f

21 files changed

+69
-62
lines changed

src/SDK/Language/DotNet.php

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -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/Appwrite.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/Appwrite/Appwrite.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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/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/Appwrite/Enums/IEnum.cs.twig',
423423
]
424424
];
425425
}
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.

templates/dotnet/src/Appwrite/Appwrite.csproj.twig renamed to templates/dotnet/Appwrite/Appwrite.csproj.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<ItemGroup>
2323
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
2424
<PackageReference Include="System.Net.Http" Version="4.3.4" />
25-
<None Include="..\..\icon.png" Pack="true" PackagePath="$(PackageIcon)"/>
26-
<None Include="..\..\README.md" Pack="true" PackagePath="$(PackageReadmeFile)"/>
25+
<None Include="..\icon.png" Pack="true" PackagePath="$(PackageIcon)"/>
26+
<None Include="..\README.md" Pack="true" PackagePath="$(PackageReadmeFile)"/>
2727
</ItemGroup>
2828

2929
</Project>

0 commit comments

Comments
 (0)