Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK.Client] Migrate NFive to netstandard2.0 #8

Open
wants to merge 8 commits into
base: feature_ci
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions .github/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mode: ContinuousDeployment
branches:
master:
tag: beta
hotfix:
tag: useBranchName
83 changes: 83 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Continuous Deployment

on:
push:
tags:
- "*"

jobs:
calculate-version:
name: Calculate Version
runs-on: ubuntu-latest
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
configFilePath: ./.github/version.yml

build:
name: Build and Release
runs-on: windows-latest
needs: calculate-version
env:
SEMVER: ${{ needs.calculate-version.outputs.semVer }}
ZipName: NFive.SDK.Client-${{ needs.calculate-version.outputs.semVer }}.zip

steps:
- uses: actions/checkout@v4

- name: Setup NuGet
uses: NuGet/setup-nuget@v2

- name: Restore dependencies
run: nuget restore NFive.SDK.Client.sln

- name: Build the solution
run: dotnet build -c Release -o Build /p:Version=${{env.SEMVER}} NFive.SDK.Client.sln

- uses: vimtor/action-zip@v1
with:
files: Build/
dest: ${{ env.ZipName }}

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.SEMVER }}
release_name: ${{ env.SEMVER }}
draft: false
prerelease: false

- name: Update release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\${{ env.ZipName }}
asset_name: ${{ env.ZipName }}
asset_content_type: application/zip

- name: Pack
run: dotnet pack NFive.SDK.Client.csproj -p:PackageVersion=${{ env.SEMVER }} --configuration Release

- name: Push nuget package
run: dotnet nuget push **/*.nupkg --skip-duplicate --source "https://api.nuget.org/v3/index.json" --api-key ${{secrets.nuget_api_key}}
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Continuous Integration

on:
push:
branches:
- "**"
tags:
- "v*.*.*"
pull_request:
branches:
- "**"

jobs:
calculate-version:
name: Calculate Version
runs-on: ubuntu-latest
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
configFilePath: ./.github/version.yml

build:
runs-on: windows-latest
needs: calculate-version
env:
SEMVER: ${{ needs.calculate-version.outputs.semVer }}

steps:
- uses: actions/checkout@v4

- name: Setup NuGet
uses: NuGet/setup-nuget@v2

- name: Restore dependencies
run: nuget restore NFive.SDK.Client.sln

- name: Build the solution
run: dotnet build -c Release -o Build /p:Version=${{env.SEMVER}} NFive.SDK.Client.sln

- name: Attach Zip as build artifact
uses: actions/upload-artifact@v4
with:
name: NFive.SDK.Client-${{ env.SEMVER }}
path: Build
134 changes: 42 additions & 92 deletions NFive.SDK.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,103 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{22732BBC-D264-4BC1-81D7-D44F5E6AFB3D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<TargetFramework>net471</TargetFramework>
<RootNamespace>NFive.SDK.Client</RootNamespace>
<AssemblyName>NFive.SDK.Client.net</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowedReferenceRelatedFileExtensions>
.allowedextension
</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowedReferenceRelatedFileExtensions>
.allowedextension
</AllowedReferenceRelatedFileExtensions>

<PackageId>NFive.SDK.Client</PackageId>
<Authors>NFive</Authors>
<Owners>NFive</Owners>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<Tags>nfive fivem gtav</Tags>
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
<RepositoryUrl>https://github.com/NFive/SDK.Client</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Title>NFive.SDK.Client</Title>
<PackageProjectUrl>https://github.com/NFive</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>nfive fivem gtav</PackageTags>
<Version>0.1.4</Version>
<Description>NFive Client SDK for plugins</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © NFive 2018-2024</Copyright>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>

<ItemGroup>
<Reference Include="CitizenFX.Core.Client, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\CitizenFX.Core.Client.1.0.4410\lib\net45\CitizenFX.Core.Client.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="JetBrains.Annotations, Version=2021.2.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
<HintPath>packages\JetBrains.Annotations.2021.2.0\lib\net20\JetBrains.Annotations.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="NFive.SDK.Core.net, Version=0.1.0.62, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\NFive.SDK.Core.0.1.0.62\lib\net452\NFive.SDK.Core.net.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="NGettext, Version=0.6.1.0, Culture=neutral, PublicKeyToken=08d3d1c89dfd2985, processorArchitecture=MSIL">
<HintPath>packages\NGettext.0.6.6\lib\net45\NGettext.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<None Include="icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<Compile Include="ClientPluginAttribute.cs" />
<Compile Include="Commands\ICommandManager.cs" />
<Compile Include="Communications\ICommunicationReceive.cs" />
<Compile Include="Communications\ICommunicationReceiveClient.cs" />
<Compile Include="Communications\ICommunicationReceiveServer.cs" />
<Compile Include="Communications\ICommunicationTarget.cs" />
<Compile Include="Communications\ICommunicationTransmit.cs" />
<Compile Include="Communications\ICommunicationTransmitClient.cs" />
<Compile Include="Communications\ICommunicationTransmitServer.cs" />
<Compile Include="Configuration\ClientConfiguration.cs" />
<Compile Include="Communications\ICommunicationManager.cs" />
<Compile Include="Communications\ICommunicationMessage.cs" />
<Compile Include="Events\ClientEvents.cs" />
<Compile Include="Events\FiveMClientEvents.cs" />
<Compile Include="Events\ITickManager.cs" />
<Compile Include="Events\SessionEvents.cs" />
<Compile Include="Extensions\ColorExtensions.cs" />
<Compile Include="Extensions\PedExtensions.cs" />
<Compile Include="Extensions\PlayerExtensions.cs" />
<Compile Include="Extensions\VectorExtensions.cs" />
<Compile Include="Input\Hotkey.cs" />
<Compile Include="Input\Input.cs" />
<Compile Include="Interface\INuiManager.cs" />
<Compile Include="Interface\IOverlayManager.cs" />
<Compile Include="Interface\Overlay.cs" />
<Compile Include="Interface\OverlayEventArgs.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SDK.cs" />
<Compile Include="Locales\LocaleCatalog.cs" />
<Compile Include="Services\Service.cs" />
<None Include="README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<PackageReference Include="CitizenFX.Core.Client" Version="1.0.5886" />
<PackageReference Include="NFive.SDK.Core" Version="0.1.4" />
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageReference Include="NGettext" Version="0.6.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" ExcludeAssets="Compile" GeneratePathProperty="true" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<Reference Include="Newtonsoft.Json">
<HintPath>$(PkgNewtonsoft_Json)\lib\portable-net40+sl5+win8+wp8+wpa81\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

</Project>
17 changes: 0 additions & 17 deletions NFive.SDK.Client.nuspec

This file was deleted.

16 changes: 0 additions & 16 deletions Properties/AssemblyInfo.cs

This file was deleted.

31 changes: 0 additions & 31 deletions appveyor.yml

This file was deleted.

Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions nuget.config

This file was deleted.

8 changes: 0 additions & 8 deletions packages.config

This file was deleted.