forked from ArthurHub/HTML-Renderer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding build pipeline for the net6 branch to push Core and Skia.
- Loading branch information
1 parent
1965791
commit f1441cf
Showing
6 changed files
with
128 additions
and
29 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#Builds on every commit to main. | ||
name: CI Build | ||
|
||
on: | ||
push: | ||
branches: [ features/net60 ] | ||
pull_request: | ||
branches: [ features/net60 ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore Source/HtmlRenderer.sln | ||
|
||
- name: Debug Build | ||
run: dotnet build Source/HtmlRenderer.sln --no-restore -p:Version=${{ format('0.9.{0}', github.run_number) }} |
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,68 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: [ v* ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
#Extract the version from the github tag | ||
- id: version | ||
run: echo "::set-output name=version_str::`echo "${{ github.ref }}" | sed -n 's/.*v\(.*\)/\1/p'`" | ||
|
||
- 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: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: TODO - Document Changes for Tagged Release | ||
draft: true | ||
prerelease: ${{ contains(steps.version.outputs.version_str, '-') }} | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore Source/HtmlRenderer.sln | ||
|
||
- name: Release Build | ||
run: dotnet build --no-restore Source/HtmlRenderer.sln -c Release -p:Version=${{ steps.version.outputs.version_str }} | ||
|
||
- name: Pack | ||
run: dotnet pack 'Source/HtmlRenderer.sln' --include-symbols --include-source --no-build -c Release -p:Version=${{ steps.version.outputs.version_str }} -p:SymbolPackageFormat=snupkg -o dist | ||
|
||
- name: Add Nuget Packages as Release Asset | ||
id: upload-release-asset-core | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: dist/ThreeCS.HtmlRenderer.${{ steps.version.outputs.version_str }}.nupkg | ||
asset_name: ThreeCS.HtmlRenderer.${{ steps.version.outputs.version_str }}.nupkg | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Add Skia Nuget Packages as Release Asset | ||
id: upload-release-asset-skia | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: dist/ThreeCS.HtmlRenderer.SkiaSharp.${{ steps.version.outputs.version_str }}.nupkg | ||
asset_name: ThreeCS.HtmlRenderer.SkiaSharp.${{ steps.version.outputs.version_str }}.nupkg | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Push to Nuget | ||
run: dotnet nuget push dist/ThreeCS.HtmlRenderer.*.${{ steps.version.outputs.version_str }}.nupkg --api-key ${{ secrets.NUGET_ORG_MSTANCOMBE_KEY }} --source https://api.nuget.org/v3/index.json |
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 |
---|---|---|
|
@@ -111,3 +111,4 @@ UpgradeLog*.XML | |
|
||
Source/.vs/ | ||
/Source/Demos/HtmlRenderer.Demo.Console/Output | ||
dist/ |
24 changes: 13 additions & 11 deletions
24
Source/HtmlRenderer.SkiaSharp/HtmlRenderer.SkiaSharp.csproj
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,17 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<PackageId>ThreeCS.HtmlRenderer.SkiaSharp</PackageId> | ||
<Description>Skia Sharp target for HtmlRenderer.</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="SkiaSharp" Version="2.88.6" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="SkiaSharp" Version="2.88.6" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\HtmlRenderer\HtmlRenderer.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\HtmlRenderer\HtmlRenderer.csproj" /> | ||
</ItemGroup> | ||
|
||
</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,23 +1,25 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>disable</Nullable> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>disable</Nullable> | ||
<PackageId>ThreeCS.HtmlRenderer</PackageId> | ||
<Description>'new' .net port of HtmlRenderer. Would be nice to merge back to arthub one day.</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Remove="Core\Utils\ImageError.png" /> | ||
<None Remove="Core\Utils\ImageLoad.png" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Remove="Core\Utils\ImageError.png" /> | ||
<None Remove="Core\Utils\ImageLoad.png" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<EmbeddedResource Include="Core\Utils\ImageError.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</EmbeddedResource> | ||
<EmbeddedResource Include="Core\Utils\ImageLoad.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<EmbeddedResource Include="Core\Utils\ImageError.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</EmbeddedResource> | ||
<EmbeddedResource Include="Core\Utils\ImageLoad.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
|
||
</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