Skip to content

Commit

Permalink
Update nugets
Browse files Browse the repository at this point in the history
  • Loading branch information
Guerra24 committed May 28, 2024
1 parent 065f141 commit b515ffd
Show file tree
Hide file tree
Showing 16 changed files with 271 additions and 270 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
# runs-on: windows-2022
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# uses: actions/checkout@v4
# - name: Prepare Env
# uses: microsoft/setup-msbuild@v1.3
# uses: microsoft/setup-msbuild@v2
# - name: Build
# env:
# DOTNET_NOLOGO: true
# run: |
# dotnet publish LRReader.Avalonia.Desktop\LRReader.Avalonia.Desktop.csproj -nologo -v:minimal /p:Configuration=Release /p:PublishProfile=linux-x64
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: LRReader.Avalonia.Desktop.Linux-X64
# path: LRReader.Avalonia.Desktop/publish/linux-x64
Expand All @@ -27,16 +27,16 @@ jobs:
# runs-on: windows-2022
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# uses: actions/checkout@v4
# - name: Prepare Env
# uses: microsoft/setup-msbuild@v1.3
# uses: microsoft/setup-msbuild@v2
# - name: Build
# env:
# DOTNET_NOLOGO: true
# run: |
# dotnet publish LRReader.Avalonia.Desktop\LRReader.Avalonia.Desktop.csproj -nologo -v:minimal /p:Configuration=Release /p:PublishProfile=macos-x64
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: LRReader.Avalonia.Desktop.macOS-X64
# path: LRReader.Avalonia.Desktop/publish/macos-x64
Expand All @@ -45,16 +45,16 @@ jobs:
# runs-on: windows-2022
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# uses: actions/checkout@v4
# - name: Prepare Env
# uses: microsoft/setup-msbuild@v1.3
# uses: microsoft/setup-msbuild@v2
# - name: Build
# env:
# DOTNET_NOLOGO: true
# run: |
# dotnet publish LRReader.Avalonia.Desktop\LRReader.Avalonia.Desktop.csproj -nologo -v:minimal /p:Configuration=Release /p:PublishProfile=win-x64
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: LRReader.Avalonia.Desktop.Win-X64
# path: LRReader.Avalonia.Desktop/publish/win-x64
Expand All @@ -65,13 +65,13 @@ jobs:
packages: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare Env
uses: microsoft/setup-msbuild@v1.3
uses: microsoft/setup-msbuild@v2
- name: Auth nuget registry
run: dotnet nuget update source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text guerra24
- name: Prepare nuget cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-uwp-${{ hashFiles('LRReader.Shared/packages.lock.json', 'LRReader.UWP/packages.lock.json') }}
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
Set-Location "./LRReader.UWP/AppPackages/LRReader.UWP"
Remove-Item $(Get-ChildItem *.appxsym -File)
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -110,7 +110,7 @@ jobs:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
run: aws s3 sync LRReader.UWP/AppPackages s3://${env:AWS_S3_BUCKET}/projects/lrr/nightly --no-progress --acl public-read --follow-symlinks --delete
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: LRReader.UWP
path: LRReader.UWP/AppPackages
Expand All @@ -124,13 +124,13 @@ jobs:
arch: [x64, ARM64]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare Env
uses: microsoft/setup-msbuild@v1.3
uses: microsoft/setup-msbuild@v2
- name: Auth nuget registry
run: dotnet nuget update source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text guerra24
- name: Prepare nuget cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-installer-${{ hashFiles('LRReader.UWP.Installer/packages.lock.json') }}
Expand All @@ -143,7 +143,7 @@ jobs:
Invoke-Expression "./Util/ConfigureInstaller.ps1"
MSBuild LRReader.UWP.Installer\LRReader.UWP.Installer.csproj -nologo -r -v:minimal /p:RestoreLockedMode=true /p:Configuration=Release /p:Platform=${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Installer-${{ matrix.arch }}
path: LRReader.UWP.Installer/bin/${{ matrix.arch }}/Release/net472/LRReader.UWP.Installer.exe
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
packages: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare Env
uses: microsoft/setup-msbuild@v1.3
uses: microsoft/setup-msbuild@v2
- name: Auth nuget registry
run: dotnet nuget update source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text guerra24
- name: Prepare nuget cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-uwp-${{ hashFiles('LRReader.Shared/packages.lock.json', 'LRReader.UWP/packages.lock.json') }}
Expand Down Expand Up @@ -49,12 +49,12 @@ jobs:
foreach ($file in $(Get-ChildItem *.appxsym -File)) { appcenter crashes upload-symbols --app Guerra24/LRReader --appxsym $file --token ${env:APPCENTER_TOKEN} }
Remove-Item $(Get-ChildItem *.appxsym -File)
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: LRReader
path: LRReader.UWP/AppPackages
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -79,13 +79,13 @@ jobs:
arch: [x64, ARM64]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare Env
uses: microsoft/setup-msbuild@v1.3
uses: microsoft/setup-msbuild@v2
- name: Auth nuget registry
run: dotnet nuget update source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text guerra24
- name: Prepare nuget cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-installer-${{ hashFiles('LRReader.UWP.Installer/packages.lock.json') }}
Expand All @@ -99,7 +99,7 @@ jobs:
Invoke-Expression "./Util/ConfigureInstaller.ps1"
MSBuild LRReader.UWP.Installer\LRReader.UWP.Installer.csproj -nologo -r -v:minimal /p:RestoreLockedMode=true /p:Configuration=Release /p:Platform=${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Installer-${{ matrix.arch }}
path: LRReader.UWP.Installer/bin/${{ matrix.arch }}/Release/net472/LRReader.UWP.Installer.exe
Expand All @@ -116,13 +116,13 @@ jobs:
packages: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare Env
uses: microsoft/setup-msbuild@v1.3
uses: microsoft/setup-msbuild@v2
- name: Auth nuget registry
run: dotnet nuget update source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text guerra24
- name: Prepare nuget cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-uwp-${{ hashFiles('LRReader.Shared/packages.lock.json', 'LRReader.UWP/packages.lock.json') }}
Expand All @@ -135,7 +135,7 @@ jobs:
Invoke-Expression "./Util/ConfigureAppCenter.ps1"
MSBuild LRReader.UWP\LRReader.UWP.csproj -nologo -r -v:minimal /p:RestoreLockedMode=true /p:Configuration=Release /p:UapAppxPackageBuildMode="StoreOnly" /p:AppxPackageSigningEnabled=false
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: LRReader_Store
path: LRReader.UWP/AppPackages/*.msixupload
8 changes: 4 additions & 4 deletions LRReader.Shared/LRReader.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NReco.Logging.File" Version="1.1.7" />
<PackageReference Include="NReco.Logging.File" Version="1.2.0" />
<PackageReference Include="Nullable" Version="1.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="RestSharp.Serializers.NewtonsoftJson" Version="110.2.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.6" />
<PackageReference Include="RestSharp" Version="111.1.0" />
<PackageReference Include="RestSharp.Serializers.NewtonsoftJson" Version="111.1.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.8" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions LRReader.Shared/Models/Main/Archive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public class Archive : IEquatable<Archive>

public string? filename { get; set; } // dev

public string? summary { get; set; } // dev

[JsonIgnore]
public string TagsClean { get; set; } = null!;
[JsonIgnore]
Expand Down
5 changes: 5 additions & 0 deletions LRReader.Shared/Models/Main/Generic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ public class GenericApiResponse<T>
public string? Json { get; set; }
}

public class CategoryCreatedApiResult : GenericApiResult
{
public string category_id { get; set; } = null!;
}

}
22 changes: 11 additions & 11 deletions LRReader.Shared/Providers/ArchivesProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static async Task<bool> Validate()

var rq = new RestRequest("api/archives");

var r = await client.ExecuteAsync(rq, Method.Head);
var r = await client.ExecuteHeadAsync(rq);

if (r.StatusCode != HttpStatusCode.OK)
return false;
Expand Down Expand Up @@ -137,11 +137,11 @@ public static async Task<bool> ChangeThumbnail(string id, int page)
{
var client = Api.Client;

var rq = new RestRequest("api/archives/{id}/thumbnail", Method.Put);
var rq = new RestRequest("api/archives/{id}/thumbnail");
rq.AddUrlSegment("id", id);
rq.AddQueryParameter("page", page);

var r = await client.ExecuteAsync(rq);
var r = await client.ExecutePutAsync(rq);

return await r.GetResult();
}
Expand All @@ -150,10 +150,10 @@ public static async Task<bool> ClearNewArchive(string id)
{
var client = Api.Client;

var rq = new RestRequest("api/archives/{id}/isnew", Method.Delete);
var rq = new RestRequest("api/archives/{id}/isnew");
rq.AddUrlSegment("id", id);

var r = await client.ExecuteAsync(rq);
var r = await client.ExecuteDeleteAsync(rq);

return await r.GetResult();
}
Expand All @@ -162,12 +162,12 @@ public static async Task<bool> UpdateArchive(string id, string title = "", strin
{
var client = Api.Client;

var rq = new RestRequest("api/archives/{id}/metadata", Method.Put);
var rq = new RestRequest("api/archives/{id}/metadata");
rq.AddUrlSegment("id", id);
rq.AddQueryParameter("title", title);
rq.AddQueryParameter("tags", tags);

var r = await client.ExecuteAsync(rq);
var r = await client.ExecutePutAsync(rq);

return await r.GetResult();
}
Expand All @@ -176,10 +176,10 @@ public static async Task<bool> UpdateArchive(string id, string title = "", strin
{
var client = Api.Client;

var rq = new RestRequest("api/archives/{id}", Method.Delete);
var rq = new RestRequest("api/archives/{id}");
rq.AddUrlSegment("id", id);

var r = await client.ExecuteAsync(rq);
var r = await client.ExecuteDeleteAsync(rq);

return await r.GetResult<DeleteArchiveResult>();
}
Expand Down Expand Up @@ -207,11 +207,11 @@ public static async Task<bool> UpdateProgress(string id, int progress)
{
var client = Api.Client;

var rq = new RestRequest("api/archives/{id}/progress/{progress}", Method.Put);
var rq = new RestRequest("api/archives/{id}/progress/{progress}");
rq.AddUrlSegment("id", id);
rq.AddParameter("progress", progress, ParameterType.UrlSegment);

var r = await client.ExecuteAsync(rq);
var r = await client.ExecutePutAsync(rq);

return await r.GetResult();
}
Expand Down
Loading

0 comments on commit b515ffd

Please sign in to comment.