diff --git a/.github/version.yml b/.github/version.yml
new file mode 100644
index 0000000..51a1759
--- /dev/null
+++ b/.github/version.yml
@@ -0,0 +1,6 @@
+mode: ContinuousDeployment
+branches:
+ master:
+ tag: beta
+ hotfix:
+ tag: useBranchName
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
new file mode 100644
index 0000000..e2cf80e
--- /dev/null
+++ b/.github/workflows/cd.yml
@@ -0,0 +1,82 @@
+name: Release
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ calculate-version:
+ name: Calculate Version
+ runs-on: ubuntu-latest
+ outputs:
+ semVer: ${{ steps.gitversion.outputs.semVer }}
+
+ steps:
+ - uses: actions/checkout@v2.4.2
+ with:
+ fetch-depth: 0
+
+ - name: Install GitVersion
+ uses: gittools/actions/gitversion/setup@v0.9.7
+ with:
+ versionSpec: "5.x"
+
+ - name: Determine Version
+ id: gitversion
+ uses: gittools/actions/gitversion/execute@v0.9.7
+ with:
+ useConfigFile: true
+ configFilePath: ./.github/GitVersion.yml
+
+ build:
+ name: Build and Release
+ runs-on: windows-latest
+ needs: calculate-version
+ env:
+ SEMVER: ${{ needs.calculate-version.outputs.semVer }}
+ ZipName: NFive.SDK.Core-${{ needs.calculate-version.outputs.semVer }}.zip
+
+ steps:
+ - uses: actions/checkout@v2.4.2
+
+ - name: Setup MSBuild
+ uses: microsoft/setup-msbuild@v1.1
+
+ - name: Setup NuGet
+ uses: NuGet/setup-nuget@v1.0.6
+
+ - name: Restore dependencies
+ run: nuget restore NFive.SDK.Core.sln
+
+ - name: Build the solution
+ run: msbuild NFive.SDK.Core.sln /p:Configuration=Release /p:Outdir=Build
+
+ - uses: vimtor/action-zip@v1
+ with:
+ files: Build/
+ dest: ${{ env.ZipName }}
+
+ # Create a Release on the GitHub project
+ - name: Create release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
+ with:
+ tag_name: ${{ env.SEMVER }}
+ release_name: ${{ env.SEMVER }}
+ draft: false
+ prerelease: false
+
+ # Upload the Build Artifact to the Release
+ - 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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
+ asset_path: .\${{ env.ZipName }}
+ asset_name: ${{ env.ZipName }}
+ asset_content_type: application/zip
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..5fff13f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,62 @@
+name: CI
+
+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@v2.4.2
+ with:
+ fetch-depth: 0
+
+ - name: Install GitVersion
+ uses: gittools/actions/gitversion/setup@v0.9.7
+ with:
+ versionSpec: "5.x"
+
+ - name: Determine Version
+ id: gitversion
+ uses: gittools/actions/gitversion/execute@v0.9.7
+ with:
+ useConfigFile: true
+ configFilePath: ./.github/GitVersion.yml
+
+ build:
+ runs-on: windows-latest
+ needs: calculate-version
+ env:
+ SEMVER: ${{ needs.calculate-version.outputs.semVer }}
+
+ steps:
+ - uses: actions/checkout@v2.4.2
+
+ - name: Setup MSBuild
+ uses: microsoft/setup-msbuild@v1.1
+
+ - name: Setup NuGet
+ uses: NuGet/setup-nuget@v1.0.6
+
+ - name: Restore dependencies
+ run: nuget restore NFive.SDK.Core.sln
+
+ - name: Build the solution
+ run: msbuild NFive.SDK.Core.sln /p:Configuration=Release /p:Outdir=Build
+
+ - name: Attach Zip as build artifact
+ uses: actions/upload-artifact@v3.1.0
+ with:
+ name: NFive.SDK.Core-${{ env.SEMVER }}
+ path: Build
diff --git a/Configuration/LocaleConfiguration.cs b/Configuration/LocaleConfiguration.cs
index b597664..83656e1 100644
--- a/Configuration/LocaleConfiguration.cs
+++ b/Configuration/LocaleConfiguration.cs
@@ -1,7 +1,7 @@
+using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Globalization;
-using JetBrains.Annotations;
namespace NFive.SDK.Core.Configuration
{
diff --git a/Configuration/SteamId.cs b/Configuration/SteamId.cs
index 50c8bc4..7276bb4 100644
--- a/Configuration/SteamId.cs
+++ b/Configuration/SteamId.cs
@@ -1,5 +1,5 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Configuration
{
diff --git a/Controllers/ControllerConfiguration.cs b/Controllers/ControllerConfiguration.cs
index 1d88826..f6b8297 100644
--- a/Controllers/ControllerConfiguration.cs
+++ b/Controllers/ControllerConfiguration.cs
@@ -1,13 +1,8 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Controllers
{
- ///
- ///
- /// Represents the configuration that is automatically loaded into a ConfigurableController.
- ///
- ///
[PublicAPI]
[Serializable]
public abstract class ControllerConfiguration : IControllerConfiguration
diff --git a/Diagnostics/ILogger.cs b/Diagnostics/ILogger.cs
index 2ffb1b9..de5f042 100644
--- a/Diagnostics/ILogger.cs
+++ b/Diagnostics/ILogger.cs
@@ -1,5 +1,5 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Diagnostics
{
diff --git a/Extensions/NumericExtensions.cs b/Extensions/NumericExtensions.cs
index f027451..e3359dc 100644
--- a/Extensions/NumericExtensions.cs
+++ b/Extensions/NumericExtensions.cs
@@ -1,5 +1,5 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Extensions
{
diff --git a/Extensions/PositionExtensions.cs b/Extensions/PositionExtensions.cs
index 921f5c6..76a9723 100644
--- a/Extensions/PositionExtensions.cs
+++ b/Extensions/PositionExtensions.cs
@@ -1,6 +1,6 @@
-using System;
using JetBrains.Annotations;
using NFive.SDK.Core.Models;
+using System;
namespace NFive.SDK.Core.Extensions
{
diff --git a/Extensions/StringExtensions.cs b/Extensions/StringExtensions.cs
index 8816ef4..45839e4 100644
--- a/Extensions/StringExtensions.cs
+++ b/Extensions/StringExtensions.cs
@@ -1,7 +1,7 @@
+using JetBrains.Annotations;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
-using JetBrains.Annotations;
namespace NFive.SDK.Core.Extensions
{
diff --git a/Extensions/Vector2Extensions.cs b/Extensions/Vector2Extensions.cs
index 2822075..301cb52 100644
--- a/Extensions/Vector2Extensions.cs
+++ b/Extensions/Vector2Extensions.cs
@@ -1,6 +1,6 @@
-using System;
using JetBrains.Annotations;
using NFive.SDK.Core.Models;
+using System;
namespace NFive.SDK.Core.Extensions
{
diff --git a/Extensions/Vector3Extensions.cs b/Extensions/Vector3Extensions.cs
index 3753325..ebfa319 100644
--- a/Extensions/Vector3Extensions.cs
+++ b/Extensions/Vector3Extensions.cs
@@ -1,6 +1,6 @@
-using System;
using JetBrains.Annotations;
using NFive.SDK.Core.Models;
+using System;
namespace NFive.SDK.Core.Extensions
{
diff --git a/Input/InputModifier.cs b/Input/InputModifier.cs
index ac4d06f..a36b453 100644
--- a/Input/InputModifier.cs
+++ b/Input/InputModifier.cs
@@ -1,5 +1,5 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Input
{
diff --git a/Locales/ILocaleCatalog.cs b/Locales/ILocaleCatalog.cs
index ab2642d..cf8e621 100644
--- a/Locales/ILocaleCatalog.cs
+++ b/Locales/ILocaleCatalog.cs
@@ -1,11 +1,8 @@
-using System.Globalization;
using JetBrains.Annotations;
+using System.Globalization;
namespace NFive.SDK.Core.Locales
{
- ///
- /// A GNU gettext locale catalog for a given culture.
- ///
[PublicAPI]
public interface ILocaleCatalog
{
diff --git a/Models/Color.cs b/Models/Color.cs
index 884b09c..9591f16 100644
--- a/Models/Color.cs
+++ b/Models/Color.cs
@@ -1,5 +1,5 @@
-using System.ComponentModel.DataAnnotations.Schema;
using JetBrains.Annotations;
+using System.ComponentModel.DataAnnotations.Schema;
namespace NFive.SDK.Core.Models
{
diff --git a/Models/IIdentityModel.cs b/Models/IIdentityModel.cs
index 5996abf..c7fd1e9 100644
--- a/Models/IIdentityModel.cs
+++ b/Models/IIdentityModel.cs
@@ -1,5 +1,5 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Models
{
diff --git a/Models/IdentityModel.cs b/Models/IdentityModel.cs
index cb07abe..21ae31b 100644
--- a/Models/IdentityModel.cs
+++ b/Models/IdentityModel.cs
@@ -1,7 +1,7 @@
-using System;
-using System.ComponentModel.DataAnnotations;
using JetBrains.Annotations;
using NFive.SDK.Core.Helpers;
+using System;
+using System.ComponentModel.DataAnnotations;
namespace NFive.SDK.Core.Models
{
diff --git a/Models/Player/Session.cs b/Models/Player/Session.cs
index dad4ea0..0a5ed75 100644
--- a/Models/Player/Session.cs
+++ b/Models/Player/Session.cs
@@ -1,8 +1,8 @@
+using JetBrains.Annotations;
+using Newtonsoft.Json;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using JetBrains.Annotations;
-using Newtonsoft.Json;
namespace NFive.SDK.Core.Models.Player
{
diff --git a/Models/Player/User.cs b/Models/Player/User.cs
index 2226da2..74cb1de 100644
--- a/Models/Player/User.cs
+++ b/Models/Player/User.cs
@@ -1,7 +1,7 @@
+using JetBrains.Annotations;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using JetBrains.Annotations;
namespace NFive.SDK.Core.Models.Player
{
diff --git a/Models/Position.cs b/Models/Position.cs
index 9f2dee1..ff02609 100644
--- a/Models/Position.cs
+++ b/Models/Position.cs
@@ -1,6 +1,6 @@
+using JetBrains.Annotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using JetBrains.Annotations;
namespace NFive.SDK.Core.Models
{
diff --git a/Models/Vector3.cs b/Models/Vector3.cs
index 42eae77..0d887c2 100644
--- a/Models/Vector3.cs
+++ b/Models/Vector3.cs
@@ -1,5 +1,5 @@
-using System.ComponentModel.DataAnnotations;
using JetBrains.Annotations;
+using System.ComponentModel.DataAnnotations;
namespace NFive.SDK.Core.Models
{
diff --git a/NFive.SDK.Core.csproj b/NFive.SDK.Core.csproj
index 78b1ecb..3ba4b9d 100644
--- a/NFive.SDK.Core.csproj
+++ b/NFive.SDK.Core.csproj
@@ -1,93 +1,18 @@
-
-
-
+
+
- Debug
- AnyCPU
- {C1DE80C7-579E-4D48-AAB8-37F5C1484F86}
- Library
- Properties
+ net471
NFive.SDK.Core
- NFive.SDK.Core.net
- v4.5.2
- 512
-
- .allowedextension
-
-
-
- false
- none
- false
- bin\Debug
- DEBUG;TRACE
- prompt
- 4
-
-
- false
- none
- true
- bin\Release
- TRACE
- prompt
- 4
+ false
+
-
- packages\JetBrains.Annotations.2021.2.0\lib\net20\JetBrains.Annotations.dll
- False
+
+
+
+
+ $(PkgNewtonsoft_Json)\lib\portable-net40+sl5+win8+wp8+wpa81\Newtonsoft.Json.dll
-
- packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll
- False
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
diff --git a/NFive.SDK.Core.nuspec b/NFive.SDK.Core.nuspec
index f6a6be3..f804298 100644
--- a/NFive.SDK.Core.nuspec
+++ b/NFive.SDK.Core.nuspec
@@ -12,6 +12,6 @@
$description$
$copyright$
nfive fivem gtav
-
+
diff --git a/NFive.SDK.Core.sln b/NFive.SDK.Core.sln
index 384d2e0..e71d847 100644
--- a/NFive.SDK.Core.sln
+++ b/NFive.SDK.Core.sln
@@ -1,6 +1,6 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27703.2035
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NFive.SDK.Core", "NFive.SDK.Core.csproj", "{C1DE80C7-579E-4D48-AAB8-37F5C1484F86}"
EndProject
diff --git a/NFive.SDK.Core.sln.DotSettings b/NFive.SDK.Core.sln.DotSettings
index ae9fefa..6efaac0 100644
--- a/NFive.SDK.Core.sln.DotSettings
+++ b/NFive.SDK.Core.sln.DotSettings
@@ -75,6 +75,7 @@
</Entry>
</TypePattern>
</Patterns>
+ False
DOF
FOV
HUD
diff --git a/PluginAttribute.cs b/PluginAttribute.cs
index 5b22d5f..719c646 100644
--- a/PluginAttribute.cs
+++ b/PluginAttribute.cs
@@ -1,13 +1,8 @@
-using System;
-using JetBrains.Annotations;
-
namespace NFive.SDK.Core
{
- ///
- ///
- /// Specifies the SDK version number the assembly was built against.
- ///
- [PublicAPI]
+ using System;
+
+
[AttributeUsage(AttributeTargets.Assembly)]
public class PluginAttribute : Attribute
{
@@ -26,4 +21,5 @@ public PluginAttribute(uint target)
this.Target = target;
}
}
+
}
diff --git a/Plugins/Client.cs b/Plugins/Client.cs
index eb55f0a..35610d5 100644
--- a/Plugins/Client.cs
+++ b/Plugins/Client.cs
@@ -1,12 +1,9 @@
+using JetBrains.Annotations;
using System;
using System.Collections.Generic;
-using JetBrains.Annotations;
namespace NFive.SDK.Core.Plugins
{
- ///
- /// Client file requirements for a plugin.
- ///
[PublicAPI]
[Serializable]
public class Client
diff --git a/Plugins/Name.cs b/Plugins/Name.cs
index 4fa0f99..4e9c878 100644
--- a/Plugins/Name.cs
+++ b/Plugins/Name.cs
@@ -1,15 +1,12 @@
-using System;
using JetBrains.Annotations;
using Newtonsoft.Json;
+using System;
namespace NFive.SDK.Core.Plugins
{
- ///
- /// Represents a plugin name, composed of the vendor and project.
- ///
- [Serializable]
[PublicAPI]
- public class Name
+ [Serializable]
+ public class Name
{
///
/// Gets or sets the plugin name vendor.
@@ -45,7 +42,7 @@ public Name(string value)
var parts = value.Split('/');
- if (parts.Length != 2) throw new ArgumentException("Invalid plugin name format, plugin name must be in \"vendor/project\" format.", nameof(value));
+ if (parts.Length != 2) throw new ArgumentException($"Invalid plugin name format \"{value}\", plugin name must be in \"vendor/project\" format.", nameof(value));
this.Vendor = parts[0];
this.Project = parts[1];
diff --git a/Plugins/Plugin.cs b/Plugins/Plugin.cs
index c067cad..95523fe 100644
--- a/Plugins/Plugin.cs
+++ b/Plugins/Plugin.cs
@@ -1,12 +1,9 @@
+using JetBrains.Annotations;
using System;
using System.Collections.Generic;
-using JetBrains.Annotations;
namespace NFive.SDK.Core.Plugins
{
- ///
- /// Represents a NFive plugin configuration.
- ///
[PublicAPI]
[Serializable]
public class Plugin
diff --git a/Plugins/Repository.cs b/Plugins/Repository.cs
index 9d51d77..b4db80b 100644
--- a/Plugins/Repository.cs
+++ b/Plugins/Repository.cs
@@ -1,11 +1,8 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Plugins
{
- ///
- /// Repository configuration for a plugin.
- ///
[PublicAPI]
[Serializable]
public class Repository
diff --git a/Plugins/Server.cs b/Plugins/Server.cs
index 2bb8481..6f194df 100644
--- a/Plugins/Server.cs
+++ b/Plugins/Server.cs
@@ -1,12 +1,9 @@
+using JetBrains.Annotations;
using System;
using System.Collections.Generic;
-using JetBrains.Annotations;
namespace NFive.SDK.Core.Plugins
{
- ///
- /// Server file requirements for a plugin.
- ///
[PublicAPI]
[Serializable]
public class Server
diff --git a/Plugins/Version.cs b/Plugins/Version.cs
index 518a1db..bf8e606 100644
--- a/Plugins/Version.cs
+++ b/Plugins/Version.cs
@@ -1,13 +1,10 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Plugins
{
- ///
- /// Represents a semantic version number.
- ///
- [Serializable]
[PublicAPI]
+ [Serializable]
public class Version
{
///
diff --git a/Plugins/VersionRange.cs b/Plugins/VersionRange.cs
index 41e4137..936b336 100644
--- a/Plugins/VersionRange.cs
+++ b/Plugins/VersionRange.cs
@@ -1,14 +1,11 @@
-using System;
using JetBrains.Annotations;
+using System;
namespace NFive.SDK.Core.Plugins
{
- ///
- /// Represents a semantic version range.
- ///
- [Serializable]
[PublicAPI]
- public class VersionRange
+ [Serializable]
+ public class VersionRange
{
///
/// Gets or sets the version range.
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 978032c..0000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-version: 0.1.0.{build}
-
-image: Visual Studio 2019
-configuration: Release
-platform: Any CPU
-clone_depth: 1
-
-branches:
- only:
- - master
-
-cache:
-- packages -> packages.config
-
-test: off
-
-assembly_info:
- patch: true
- file: Properties\AssemblyInfo.cs
- assembly_version: "{version}"
- assembly_file_version: "{version}"
- assembly_informational_version: "{version}"
-
-before_build:
-- nuget update -self
-- nuget restore
-
-build:
- project: NFive.SDK.Core.sln
- verbosity: minimal
- publish_nuget: true
diff --git a/packages.config b/packages.config
deleted file mode 100644
index 22cb545..0000000
--- a/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file