From 104b5186256b2b54cdbcd59216be791cc3154cd4 Mon Sep 17 00:00:00 2001 From: TheSnowfield <17957399+TheSnowfield@users.noreply.github.com> Date: Sun, 24 Mar 2024 00:00:56 +0800 Subject: [PATCH] ci: add github workflow --- .github/workflows/stable-build.yaml | 43 +++++++++++++++++++++++++++++ Konata.Codec/Konata.Codec.csproj | 24 +++------------- Konata.Codec/Konata.Codec.nuspec | 39 ++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/stable-build.yaml create mode 100644 Konata.Codec/Konata.Codec.nuspec diff --git a/.github/workflows/stable-build.yaml b/.github/workflows/stable-build.yaml new file mode 100644 index 0000000..a5e666a --- /dev/null +++ b/.github/workflows/stable-build.yaml @@ -0,0 +1,43 @@ +name: Publish NuGet Package + +on: + push: + branches: ["main"] + tags: + - 'v*.*.*' + +jobs: + Stable Build: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v4 + name: Checkout Files + + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - uses: robinraju/release-downloader@v1.9 + name: Prepare Binaries + with: + repository: "KonataDev/libSilkCodec" + latest: true + tarBall: false + zipBall: false + preRelease: true + fileName: "*" + out-file-path: "Konata.Codec/bin/runtimes" + + - name: Dotnet Publish + run: | + cd Konata.Codec + dotnet build Konata.Codec.csproj + dotnet pack -p:NuspecFile=Konata.Codec.nuspec && ls -al bin/Release + + - uses: actions/upload-artifact@v3 + name: Upload Artifact + with: + name: artifact.zip + path: Konata.Codec/bin/Release/Konata.Codec*.nupkg diff --git a/Konata.Codec/Konata.Codec.csproj b/Konata.Codec/Konata.Codec.csproj index 4b0ebfd..1f5a100 100644 --- a/Konata.Codec/Konata.Codec.csproj +++ b/Konata.Codec/Konata.Codec.csproj @@ -4,38 +4,22 @@ netstandard2.1 Library latest - true - Konata Project - Konata Project - Konata Codec - Konata Project (C) 2024 - https://github.com/KonataDev/Konata.Codec - Audio & Video codec library for Konata. - 1.3.1 en-US - $(PackageVersion) - LICENSE true - .\$(OutDir)\Konata.Codec.xml + ./bin/Konata.Codec.xml - + - - True - - - - True - - + + diff --git a/Konata.Codec/Konata.Codec.nuspec b/Konata.Codec/Konata.Codec.nuspec new file mode 100644 index 0000000..5101f9f --- /dev/null +++ b/Konata.Codec/Konata.Codec.nuspec @@ -0,0 +1,39 @@ + + + + Konata.Codec + 1.3.1 + Konata Project + true + LICENSE + https://aka.ms/deprecateLicenseUrl + Audio & Video codec library for Konata. + Konata Project (C) 2024 + + + + + + + + + + + + + + + + + + + + + + + + + + + +