Skip to content

Commit

Permalink
ci: Use dotnet build.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Jul 10, 2024
1 parent f582b4c commit cafe987
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 23 deletions.
50 changes: 30 additions & 20 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,33 @@ on:

jobs:
build-test-publish:
name: Build, test and publish
uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main
with:
os: windows-2022
use-msbuild: true
#install-latest-msbuild: true
install-tizen: true
workloads: maui
project-path:
# This is required for correct publishing to NuGet
/target:libs\H_GeneratedIcons_SkiaSharp
/target:libs\H_GeneratedIcons_System_Drawing
/target:libs\H_NotifyIcon
/target:libs\H_NotifyIcon_Uno
/target:libs\H_NotifyIcon_Uno_WinUI
/target:libs\H_NotifyIcon_WinUI
/target:libs\H_NotifyIcon_Wpf
/target:libs\H_NotifyIcon_Maui
secrets:
nuget-key: ${{ secrets.NUGET_KEY }}
name: Build, test and publish library
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install workloads
run: dotnet workload install maui

- name: Install Tizen workload on macOS / Linux
if: runner.os != 'Windows'
run: curl -sSL https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.sh | sudo bash

- name: Install Tizen workload on Windows
if: runner.os == 'Windows'
run: |
Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1'
./workload-install.ps1
- name: Build all projects in src/libs
run: |
Get-ChildItem -Path src/libs -Recurse -Filter *.csproj | ForEach-Object { dotnet build $_.FullName --configuration Release }
shell: pwsh

- name: Publish
run: dotnet nuget push
**.nupkg
--skip-duplicate
--source https://api.nuget.org/v3/index.json
--api-key ${{ secrets.NUGET_KEY }}
5 changes: 2 additions & 3 deletions src/libs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@
</ItemGroup>

<PropertyGroup Label="Nuget">
<BUILD_NUMBER Condition="'$(BUILD_NUMBER)' == ''">1</BUILD_NUMBER>
<Version>2.0.$(BUILD_NUMBER)</Version>
<Version>2.1.0</Version>
<PackageReleaseNotes>$(PACKAGE_RELEASE_NOTES)</PackageReleaseNotes>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>havendv -&gt; Lakritzator and Philipp Sumi</Authors>
<Authors>havendv</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>nuget_icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down

0 comments on commit cafe987

Please sign in to comment.