Skip to content

Commit

Permalink
Add csproj and simple build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed May 28, 2024
1 parent fbc59f1 commit 8c4c005
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
types: [opened, reopened, synchronize]
workflow_call:
workflow_dispatch:

name: ci-build

env:
DOTNET_VERSION: 8.0.x
REGISTRY: ghcr.io

jobs:

build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET SDK ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Publish API
run: dotnet build OpenShock.Serialization.Flatbuffers.csproj -c Release -o ./publish

- name: Upload Nuget artifacts
uses: actions/upload-artifact@v4
with:
name: API
path: |
publish/*.nupkg
publish/*.snupkg
retention-days: 1
if-no-files-found: error
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bin/
obj/
.idea
.vs
.vscode
49 changes: 49 additions & 0 deletions OpenShock.Serialization.Flatbuffers.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetFrameworks>net8.0;netstandard2.1</TargetFrameworks>
<LangVersion>12</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Title>OpenShock.Serialization.Flatbuffers</Title>
<Authors>OpenShock</Authors>
<Description>Contains flatbuffers source files with flatbuffers compiler setup to generate useable flatbuffer bindings</Description>
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageId>OpenShock.Serialization.Flatbuffers</PackageId>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
<PackageTags>openshock</PackageTags>
<PackageProjectUrl>https://openshock.org</PackageProjectUrl>
<RepositoryUrl>https://github.com/OpenShock/SDK.CSharp</RepositoryUrl>
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<Company>OpenShock</Company>
<RootNamespace>OpenShock.Serialization.Flatbuffers</RootNamespace>
<AssemblyName>OpenShock.Serialization.Flatbuffers</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FlatSharp.Compiler" Version="7.6.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FlatSharp.Runtime" Version="7.6.0" />
</ItemGroup>

<ItemGroup>
<FlatSharpSchema Include="HubToGatewayMessage.fbs" />
<FlatSharpSchema Include="GatewayToHubMessage.fbs" />
<FlatSharpSchema Include="Types\ShockerCommandType.fbs" />
<FlatSharpSchema Include="Types\ShockerModelType.fbs" />
</ItemGroup>


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

</Project>

0 comments on commit 8c4c005

Please sign in to comment.