-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nuget deployment Add .NET 4.7.2 example Fix package output path to reduce filesize. Use semantic-version Get rid of .NET 3.1 on build (for now?) Remove `GeneratePackageOnBuild`: dotnet/sdk#10335 Move test to it's own step Use GitHubActionsTestLogger for tests Force win target for PictSharp.drawing Try combining actions Add .net core needed for .net standard? Fix project path Fix msbuild Another fix of actions Remove msbuild path from windows build Add BuildNetCore option to prevent net472 tests running Fix readme and try fix dotnet test under linux Add Manual Build process Fix all warnings, and add XML comments MsBuild package fixes Fix up license to MIT
- Loading branch information
Showing
28 changed files
with
441 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,88 @@ | ||
name: build | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
core-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup .NET Core SDK 6.0 | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 6.0.x | ||
- uses: paulhatch/[email protected] | ||
id: semantic_version | ||
with: | ||
tag_prefix: "v" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build Core | ||
run: dotnet build --configuration Release --no-restore PictSharp.Core -o ./bin | ||
- name: Build ImageSharp | ||
run: dotnet build --configuration Release --no-restore PictSharp.ImageSharpAdaptor -o ./bin /p:Version=${{ steps.semantic_version.outputs.VERSION }} | ||
- name: Pack Core | ||
run: dotnet pack --configuration Release --no-restore PictSharp.Core -o ./nupkgs /p:Version=${{ steps.semantic_version.outputs.VERSION }} | ||
- name: Pack ImageSharpAdaptor | ||
run: dotnet pack --configuration Release --no-restore PictSharp.ImageSharpAdaptor -o ./nupkgs /p:Version=${{ steps.semantic_version.outputs.VERSION }} | ||
- name: Upload Compiled Binaries | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dotnetcore-bin | ||
path: bin/ | ||
- name: Upload PictSharp.Core Package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: PictSharp.Core.nupkg | ||
path: nupkgs/PictSharp.Core.* | ||
- name: Upload PictSharp.ImageSharpAdaptor Package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: PictSharp.ImageSharpAdaptor.nupkg | ||
path: nupkgs/PictSharp.ImageSharpAdaptor.* | ||
windows-build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
- uses: paulhatch/[email protected] | ||
id: semantic_version | ||
with: | ||
tag_prefix: "v" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Setup .NET Core SDK 6.0 | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore NuGet Packages | ||
run: nuget restore PictSharp.sln | ||
- name: Build PictSharp.Drawing | ||
run: msbuild .\PictSharp.Drawing\PictSharp.Drawing.csproj /p:Configuration=Release /p:OutputPath=..\bin | ||
- name: Package | ||
run: msbuild -t:pack /p:Configuration=Release /p:PackageOutputPath=..\nupkgs .\PictSharp.Drawing\PictSharp.Drawing.csproj /p:Version=${{ steps.semantic_version.outputs.VERSION }} | ||
- name: Upload Compiled | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dotnet-4-7-2-bin | ||
path: bin\* | ||
- name: Upload Packages | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: PictSharp.Drawing.nupkg | ||
path: .\nupkgs\* | ||
test: | ||
needs: [core-build, windows-build] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
- name: Setup .NET Core SDK 3.1 | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -15,9 +93,49 @@ jobs: | |
dotnet-version: 6.0.x | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build Core | ||
run: dotnet build --configuration Release --no-restore PictSharp.Core | ||
- name: Build ImageSharp | ||
run: dotnet build --configuration Release --no-restore PictSharp.ImageSharpAdaptor | ||
- name: Test | ||
run: dotnet test --no-restore --verbosity normal PictSharp.Tests | ||
run: dotnet test PictSharp.Tests --no-restore --logger GitHubActions | ||
publish: | ||
needs: [test] | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Verify commit exists in origin/master | ||
run: git branch --remote --contains | grep origin/master | ||
- name: Set VERSION variable from tag | ||
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | ||
- name: Download PictSharp.Core.nupkg | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: 'PictSharp.Core.nupkg' | ||
path: ./nupkgs | ||
- name: Download PictSharp.ImageSharpAdaptor.nupkg Package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: 'PictSharp.ImageSharpAdaptor.nupkg' | ||
path: ./nupkgs | ||
- name: Download PictSharp.Drawing.nupkg | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: 'PictSharp.Drawing.nupkg' | ||
path: ./nupkgs | ||
- name: Setup .NET Core SDK 6.0 | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Push to Github Repository | ||
run: dotnet nuget push ./nupkgs/*.nupkg --source https://nuget.pkg.github.com/pgodwin/index.json --api-key ${GITHUB_TOKEN} --skip-duplicate | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish the package to nuget.org | ||
run: dotnet nuget push ./nupkgs/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json --skip-duplicate | ||
env: | ||
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<BuildNetCoreOnly>false</BuildNetCoreOnly> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
BSD 3-Clause License | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017, Peter Godiwn | ||
All rights reserved. | ||
Copyright (c) 2017-2021 Peter Godwin | ||
Copyright (c) 2018-2021 yigolden | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.