Skip to content

Commit

Permalink
Merge pull request #47 from Deadpikle/feature/net8
Browse files Browse the repository at this point in the history
Revise CI/CD to build on all OS; bump to .NET 8
  • Loading branch information
Deadpikle authored Sep 15, 2023
2 parents defa4a1 + d78997f commit 6731067
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 17 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
name: publish to nuget
name: Build and publish to nuget
on:
push:
branches:
- main # Used for stable releases
- develop # Used for preview releases
pull_request:
jobs:
build:
name: Build check for all branches
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4

- name: Setup dotnet 5-8
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
- name: build AvaloniaProgressRing in Release on each OS as a smoke test (inc. PR's)
run: dotnet build ${{ github.workspace }}/AvaloniaProgressRing/AvaloniaProgressRing.csproj --configuration Release

publish:
name: list on nuget
runs-on: windows-latest
needs: build
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.3.1
- uses: actions/checkout@v4

- name: Setup dotnet 5 and 6 and 7
- name: Setup dotnet 5-8
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest
Expand All @@ -29,19 +51,17 @@ jobs:
# with:
# dotnet-version: 3.1.100
- name: build AvaloniaProgressRing in Release
run: dotnet build AvaloniaProgressRing/AvaloniaProgressRing.csproj --configuration Release
run: dotnet build ${{ github.workspace }}/AvaloniaProgressRing/AvaloniaProgressRing.csproj --configuration Release

# Publish
- name: publish Deadpikle.AvaloniaProgressRing on version change
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
with:
PROJECT_FILE_PATH: AvaloniaProgressRing/AvaloniaProgressRing.csproj # Relative to repository root
PROJECT_FILE_PATH: ${{ github.workspace }}/AvaloniaProgressRing/AvaloniaProgressRing.csproj # Relative to repository root
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
# VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
TAG_COMMIT: true # Flag to enable / disalge git tagging
# TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
PACKAGE_NAME: Deadpikle.AvaloniaProgressRing
INCLUDE_SYMBOLS: true


6 changes: 3 additions & 3 deletions AvaloniaProgressRing/AvaloniaProgressRing.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5;netstandard2.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net5;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.10.1</Version>
<Version>0.10.2</Version>
<Authors>Deadpikle</Authors>
<Description>A progress ring control for Avalonia modeled after ModernWpf's ProgressRing control</Description>
<Copyright>2023 Deadpikle</Copyright>
Expand All @@ -27,7 +27,7 @@
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.3" />
<PackageReference Include="Avalonia" Version="11.0.4" />
</ItemGroup>
<ItemGroup>
<None Include="..\LICENSE.md">
Expand Down
8 changes: 4 additions & 4 deletions AvaloniaProgressRingSample/AvaloniaProgressRingSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
</AvaloniaResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.3" />
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.3" />
<PackageReference Include="Avalonia" Version="11.0.4" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.4" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.3" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AvaloniaProgressRing\AvaloniaProgressRing.csproj" />
Expand Down

0 comments on commit 6731067

Please sign in to comment.