diff --git a/.ci-skip-tests b/.ci-skip-tests new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..793249f --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,55 @@ +name: Generic Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + DOTNET_NOLOGO: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 50 + - run: git fetch --tags + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore + + - name: Test + run: "[ -f .ci-skip-tests ] && echo 'Skipping tests' || dotnet test --no-build --verbosity normal" + + - name: Pack + if: github.ref == 'refs/heads/master' + run: dotnet pack -c Debug -o Build + + - name: "Github packages: Nuget push" + if: github.ref == 'refs/heads/master' + run: dotnet nuget push --no-symbols 1 --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" Build/*.nupkg + + - name: "Github packages: Cleanup" + if: github.ref == 'refs/heads/master' + uses: stripethree/gpr-janitor@dist + with: + dry-run: false + keep-versions: 25 + min-age-days: 14 + versions-to-fetch: 20 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + \ No newline at end of file diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml new file mode 100644 index 0000000..c26f82b --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,35 @@ +name: Nuget push (tag) + +on: + push: + tags: + - 'v*' + +env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + DOTNET_NOLOGO: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + # We do not need to fetch tags, as we're already at a tagged build - it should be available automatically + + - name: Setup .NET Core 5.0 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.x' + + - name: Pack + run: dotnet pack -c Release -o Build + + - name: ls + run: ls -alh Build/ + + - name: Nuget push (github) + run: dotnet nuget push --no-symbols 1 --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" Build/*.nupkg + + - name: Nuget push + run: dotnet nuget push --skip-duplicate -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json Build/*.nupkg \ No newline at end of file diff --git a/.gitignore b/.gitignore index ebb76f8..ceb05f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,5 @@ -# Temporary Folders +.vs/ bin/ obj/ -packages/ - -# VS -.vs/ *.user -*.DotSettings - -# Project specific -TestApplication/config.json -*.lock.json \ No newline at end of file +Build/ \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..c188d79 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,46 @@ + + + + latest + + + + + LordMike + MBWarez + Michael Bisbjerg $([System.DateTime]::Now.ToString(yyyy)) + + + + + true + + + $(NoWarn);CS1591 + + portable + true + snupkg + + v + + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + + + + + + + + + true + + + + + + + + + diff --git a/TMDbLib.sln b/TMDbLib.sln index 84410e7..498cd57 100644 --- a/TMDbLib.sln +++ b/TMDbLib.sln @@ -1,20 +1,25 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26114.2 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31105.61 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TMDbLib", "TMDbLib\TMDbLib.csproj", "{A7D4744C-9EF2-4CC3-B786-E8E568874933}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TMDbLib", "TMDbLib\TMDbLib.csproj", "{A7D4744C-9EF2-4CC3-B786-E8E568874933}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApplication", "TestApplication\TestApplication.csproj", "{4C8E1F72-DA9D-4EC6-8C04-5EC8EDC59FA1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApplication", "TestApplication\TestApplication.csproj", "{4C8E1F72-DA9D-4EC6-8C04-5EC8EDC59FA1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TMDbLibTests", "TMDbLibTests\TMDbLibTests.csproj", "{228615EB-BFA3-44A7-8648-A7EA48470777}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TMDbLibTests", "TMDbLibTests\TMDbLibTests.csproj", "{228615EB-BFA3-44A7-8648-A7EA48470777}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{26BF5A0A-354A-46F5-A20C-0BEB5D45783A}" ProjectSection(SolutionItems) = preProject - appveyor.yml = appveyor.yml + Directory.Build.props = Directory.Build.props Readme.md = Readme.md EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Imports", "_Imports", "{EAFDB80A-E5BA-42EF-927D-D3E4079EF0FE}" + ProjectSection(SolutionItems) = preProject + _Imports\Local.targets = _Imports\Local.targets + _Imports\Test.targets = _Imports\Test.targets + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -37,4 +42,10 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {EAFDB80A-E5BA-42EF-927D-D3E4079EF0FE} = {26BF5A0A-354A-46F5-A20C-0BEB5D45783A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {896D6C40-519C-452C-ADEF-F7A51C6D79B5} + EndGlobalSection EndGlobal diff --git a/TMDbLib/Properties/AssemblyInfo.cs b/TMDbLib/Properties/AssemblyInfo.cs index 3af0824..d3e0c6a 100644 --- a/TMDbLib/Properties/AssemblyInfo.cs +++ b/TMDbLib/Properties/AssemblyInfo.cs @@ -1,18 +1,3 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c8cd805d-f17a-4919-9adb-b5f50d72f32a")] +using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("TMDbLibTests")] \ No newline at end of file diff --git a/TMDbLib/TMDbLib.csproj b/TMDbLib/TMDbLib.csproj index 2bea5eb..c587118 100644 --- a/TMDbLib/TMDbLib.csproj +++ b/TMDbLib/TMDbLib.csproj @@ -1,16 +1,11 @@ - + - TMDb Library - 1.7.6-alpha LordMike;Naliath net45;netstandard2.1;netstandard2.0;netstandard1.2 TMDbLib TMDbLib - https://github.com/LordMike/TMDbLib - git - https://github.com/LordMike/TMDbLib - false + .NET Client library for The Movie Database (https://www.themoviedb.org/) diff --git a/TMDbLibTests/Properties/AssemblyInfo.cs b/TMDbLibTests/Properties/AssemblyInfo.cs deleted file mode 100644 index f4899e7..0000000 --- a/TMDbLibTests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TMDbLibTests")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("228615eb-bfa3-44a7-8648-a7ea48470777")] diff --git a/TMDbLibTests/TMDbLibTests.csproj b/TMDbLibTests/TMDbLibTests.csproj index 4814462..f547593 100644 --- a/TMDbLibTests/TMDbLibTests.csproj +++ b/TMDbLibTests/TMDbLibTests.csproj @@ -1,13 +1,9 @@  + + - netcoreapp3.0 - TMDbLibTests - TMDbLibTests - true - false - false - false + net5.0 diff --git a/TestApplication/Properties/AssemblyInfo.cs b/TestApplication/Properties/AssemblyInfo.cs deleted file mode 100644 index 3ab60e2..0000000 --- a/TestApplication/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TestApplication")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("4c8e1f72-da9d-4ec6-8c04-5ec8edc59fa1")] diff --git a/TestApplication/TestApplication.csproj b/TestApplication/TestApplication.csproj index 4b3b398..b71ef81 100644 --- a/TestApplication/TestApplication.csproj +++ b/TestApplication/TestApplication.csproj @@ -1,22 +1,14 @@  + + - netcoreapp3.0 - TestApplication + net5.0 Exe - TestApplication - false - false - false - 7.1 - - - - diff --git a/_Imports/Local.targets b/_Imports/Local.targets new file mode 100644 index 0000000..c9d1795 --- /dev/null +++ b/_Imports/Local.targets @@ -0,0 +1,21 @@ + + + + + LordMike;Naliath + + + + + TMDb Library + TMDbLib + MIT + https://github.com/LordMike/TMDbLib + + + + https://github.com/LordMike/TMDbLib + git + + + diff --git a/_Imports/Test.targets b/_Imports/Test.targets new file mode 100644 index 0000000..24bd5b2 --- /dev/null +++ b/_Imports/Test.targets @@ -0,0 +1,5 @@ + + + false + + diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ce0270a..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,27 +0,0 @@ -image: Visual Studio 2019 -build_script: -- ps: >- - [xml]$doc = (Get-Content .\TMDbLib\TMDbLib.csproj) - - $version = $doc.Project.PropertyGroup.VersionPrefix - - Update-AppveyorBuild -Version "$version build $env:APPVEYOR_BUILD_NUMBER" -- ps: # Core -- ps: msbuild /t:Restore -- ps: # Build Library -- ps: msbuild /t:Build /p:Configuration=Release TMDbLib -- ps: # Library -- ps: msbuild /t:Pack /p:Configuration=Release /p:OutputPath=..\Nuget\ TMDbLib -- ps: # Test app -- ps: msbuild /t:Build /p:Configuration=Release TestApplication -- ps: # Tests -- ps: msbuild /t:Build /p:Configuration=Release TMDbLibTests -test: off -artifacts: -- path: Nuget\*.nupkg -deploy: -- provider: NuGet - api_key: - secure: ch6RGtpjkDrtKY80rhqf1WMJjfdEA+0YaeVC5xTexA5V6qU1MjdcF2b7aEMBj0SH - on: - branch: nuget \ No newline at end of file