diff --git a/.github/version.yml b/.github/version.yml new file mode 100644 index 0000000..a013f09 --- /dev/null +++ b/.github/version.yml @@ -0,0 +1,6 @@ +mode: ContinuousDeployment +branches: + master: + tag: beta + hotfix: + tag: useBranchName \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..ef7bd39 --- /dev/null +++ b/.github/workflows/cd.yml @@ -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/setup@v0.10.2 + with: + versionSpec: "5.x" + + - name: Determine Version + id: gitversion + uses: gittools/actions/gitversion/execute@v0.10.2 + 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}} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5e5fef6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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/setup@v0.10.2 + with: + versionSpec: "5.x" + + - name: Determine Version + id: gitversion + uses: gittools/actions/gitversion/execute@v0.10.2 + 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 \ No newline at end of file diff --git a/NFive.SDK.Client.csproj b/NFive.SDK.Client.csproj index ea586ca..3471947 100644 --- a/NFive.SDK.Client.csproj +++ b/NFive.SDK.Client.csproj @@ -1,103 +1,53 @@ - - - + + - Debug - AnyCPU - {22732BBC-D264-4BC1-81D7-D44F5E6AFB3D} - Library - Properties + net471 NFive.SDK.Client NFive.SDK.Client.net - v4.5.2 - 512 - - - false - none - false - bin\Debug - DEBUG;TRACE - prompt - 4 - - .allowedextension - - - - false - none - true - bin\Release - TRACE - prompt - 4 - - .allowedextension - + + NFive.SDK.Client + NFive + NFive + LGPL-3.0-only + nfive fivem gtav + false + https://github.com/NFive/SDK.Client + git + NFive.SDK.Client + https://github.com/NFive + icon.png + nfive fivem gtav + 0.1.4 + NFive Client SDK for plugins + README.md + Copyright © NFive 2018-2024 + en-US + - - packages\CitizenFX.Core.Client.1.0.4410\lib\net45\CitizenFX.Core.Client.dll - False - - - packages\JetBrains.Annotations.2021.2.0\lib\net20\JetBrains.Annotations.dll - False - - - - packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll - False - - - packages\NFive.SDK.Core.0.1.0.62\lib\net452\NFive.SDK.Core.net.dll - False - - - packages\NGettext.0.6.6\lib\net45\NGettext.dll - False - - - + + True + \ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + True + \ + + - - Designer - + + + + + + + + $(PkgNewtonsoft_Json)\lib\portable-net40+sl5+win8+wp8+wpa81\Newtonsoft.Json.dll + - - + \ No newline at end of file diff --git a/NFive.SDK.Client.nuspec b/NFive.SDK.Client.nuspec deleted file mode 100644 index ace96b9..0000000 --- a/NFive.SDK.Client.nuspec +++ /dev/null @@ -1,17 +0,0 @@ - - - - NFive.SDK.Client - $version$ - $title$ - NFive - NFive - false - LGPL-3.0-only - https://github.com/NFive/SDK.Client - $description$ - $copyright$ - nfive fivem gtav - - - diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs deleted file mode 100644 index 1dfe10f..0000000 --- a/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("NFive Client SDK")] -[assembly: AssemblyDescription("NFive client SDK for plugin development")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("NFive")] -[assembly: AssemblyProduct("NFive SDK")] -[assembly: AssemblyCopyright("Copyright © NFive 2018-2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] -[assembly: Guid("f6aa79c1-4e08-4a75-a0b4-ffd2b33d89d7")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 0c4e1be..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.Client.sln - verbosity: minimal - publish_nuget: true diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..1d2da72 Binary files /dev/null and b/icon.png differ diff --git a/nuget.config b/nuget.config deleted file mode 100644 index 046928f..0000000 --- a/nuget.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/packages.config b/packages.config deleted file mode 100644 index 1896ccd..0000000 --- a/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file