Skip to content

Commit

Permalink
ci: add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSnowfield committed Mar 23, 2024
1 parent 0a52b27 commit 104b518
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 20 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/stable-build.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
24 changes: 4 additions & 20 deletions Konata.Codec/Konata.Codec.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,22 @@
<TargetFramework>netstandard2.1</TargetFramework>
<OutputType>Library</OutputType>
<LangVersion>latest</LangVersion>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Konata Project</Authors>
<Company>Konata Project</Company>
<Product>Konata Codec</Product>
<Copyright>Konata Project (C) 2024</Copyright>
<RepositoryUrl>https://github.com/KonataDev/Konata.Codec</RepositoryUrl>
<Description>Audio &amp; Video codec library for Konata.</Description>
<PackageVersion>1.3.1</PackageVersion>
<NeutralLanguage>en-US</NeutralLanguage>
<Version>$(PackageVersion)</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>.\$(OutDir)\Konata.Codec.xml</DocumentationFile>
<DocumentationFile>./bin/Konata.Codec.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MP3Sharp" Version="1.0.5"/>
<PackageReference Include="NVorbis" Version="0.10.5" />
<PackageReference Include="NVorbis" Version="0.10.5"/>
</ItemGroup>

<ItemGroup>
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\LICENSE"/>
<None Include="..\README.md"/>
</ItemGroup>

<!-- Get Build Stamp -->
Expand Down
39 changes: 39 additions & 0 deletions Konata.Codec/Konata.Codec.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Konata.Codec</id>
<version>1.3.1</version>
<authors>Konata Project</authors>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="file">LICENSE</license>
<licenseUrl>https://aka.ms/deprecateLicenseUrl</licenseUrl>
<description>Audio &amp; Video codec library for Konata.</description>
<copyright>Konata Project (C) 2024</copyright>
<repository type="git" url="https://github.com/KonataDev/Konata.Codec"/>
<dependencies>
<group targetFramework=".NETStandard2.1">
<dependency id="MP3Sharp" version="1.0.5" exclude="Build,Analyzers" />
<dependency id="NVorbis" version="0.10.5" exclude="Build,Analyzers" />
</group>
</dependencies>
<contentFiles>
<files include="bin/runtimes/*.*" buildAction="files" copyToOutput="true" flatten="true"/>
</contentFiles>
</metadata>
<files>
<file src="..\LICENSE" target="LICENSE"/>
<file src="..\README.md" target="README.md"/>
<file src="bin/Release/netstandard2.1/*" target="lib/netstandard2.1/"/>
<file src="bin/Konata.Codec.xml" target="lib/netstandard2.1/"/>
<file src="bin/runtimes/libSilkCodec-windows-x86_64.dll" target="runtimes/win-x64/native/libSilkCodec.dll"/>
<file src="bin/runtimes/libSilkCodec-windows-x86.dll" target="runtimes/win-x86/native/libSilkCodec.dll"/>
<file src="bin/runtimes/libSilkCodec-linux-musl-amd64.so" target="runtimes/linux-musl-x64/native/libSilkCodec.so"/>
<file src="bin/runtimes/libSilkCodec-linux-musl-arm64.so" target="runtimes/linux-musl-arm64/native/libSilkCodec.so"/>
<file src="bin/runtimes/libSilkCodec-linux-musl-arm.so" target="runtimes/linux-musl-arm/native/libSilkCodec.so"/>
<file src="bin/runtimes/libSilkCodec-linux-amd64.so" target="runtimes/linux-x64/native/libSilkCodec.so"/>
<file src="bin/runtimes/libSilkCodec-linux-arm.so" target="runtimes/linux-arm/native/libSilkCodec.so"/>
<file src="bin/runtimes/libSilkCodec-linux-arm64.so" target="runtimes/linux-arm64/native/libSilkCodec.so"/>
<file src="bin/runtimes/libSilkCodec-darwin-amd64.dylib" target="runtimes/osx-x64/native/libSilkCodec.dylib"/>
<file src="bin/runtimes/libSilkCodec-darwin-arm64.dylib" target="runtimes/osx-arm64/native/libSilkCodec.dylib"/>
</files>
</package>

0 comments on commit 104b518

Please sign in to comment.