Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
build-and-test:
runs-on: ubuntu-latest

services:
libretranslate:
image: libretranslate/libretranslate:latest
ports:
- 5000:5000
options: >-
--health-cmd "curl -f http://localhost:5000/languages || exit 1"
--health-interval 30s
--health-timeout 10s
--health-retries 10
--health-start-period 120s

steps:
- uses: actions/checkout@v4

- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.x

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release

- name: Test (net8.0)
run: dotnet test --no-build --configuration Release --framework net8.0

- name: Test (net10.0)
run: dotnet test --no-build --configuration Release --framework net10.0
67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to NuGet

on:
push:
tags:
- 'v*'

permissions:
id-token: write

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.x

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release

- name: Pack
run: dotnet pack LibreTranslate.Net.Enhanced/LibreTranslate.Net.Enhanced.csproj --no-build --configuration Release --output ./nupkg

- name: Login to NuGet via OIDC
uses: NuGet/login@v1
id: nuget-login
with:
user: ALDamico

- name: Push to NuGet
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
12 changes: 0 additions & 12 deletions LibreTranslate.Net.Cmd/LibreTranslate.Net.Cmd.csproj

This file was deleted.

28 changes: 0 additions & 28 deletions LibreTranslate.Net.Cmd/Program.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<RepositoryUrl>https://github.com/ALDamico/LibreTranslate.Net.Enhanced</RepositoryUrl>
<RepositoryType>c#</RepositoryType>
<PackageReleaseNotes>Added new language support</PackageReleaseNotes>
<Version>1.6.4</Version>
<AssemblyVersion>1.6.0</AssemblyVersion>
<Version>1.9.5</Version>
<AssemblyVersion>1.9.5</AssemblyVersion>
<TargetFrameworks>netstandard2.0;net10.0;net8.0</TargetFrameworks>
</PropertyGroup>

Expand Down
Loading
Loading