From f05accdb7d43ac3e56f8e29f091db76d358a7960 Mon Sep 17 00:00:00 2001 From: Michael Babienco Date: Fri, 15 Sep 2023 13:34:36 -0400 Subject: [PATCH] Revise CI/CD to build on all OS; bump to .NET 8 --- .github/workflows/publish-nuget.yml | 42 +++++++++++++------ .../AvaloniaProgressRing.csproj | 6 +-- .../AvaloniaProgressRingSample.csproj | 8 ++-- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index 425d916..f1c7f99 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -1,26 +1,46 @@ -name: publish to nuget +name: Build and publish to nuget on: push: branches: - - main # Used for stable releases - - develop # Used for preview releases + - "*" 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' 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 @@ -29,13 +49,13 @@ 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> # Regex pattern to extract version info in a capturing group TAG_COMMIT: true # Flag to enable / disalge git tagging @@ -43,5 +63,3 @@ jobs: NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key PACKAGE_NAME: Deadpikle.AvaloniaProgressRing INCLUDE_SYMBOLS: true - - diff --git a/AvaloniaProgressRing/AvaloniaProgressRing.csproj b/AvaloniaProgressRing/AvaloniaProgressRing.csproj index a22fa50..0f21979 100644 --- a/AvaloniaProgressRing/AvaloniaProgressRing.csproj +++ b/AvaloniaProgressRing/AvaloniaProgressRing.csproj @@ -1,9 +1,9 @@  - net5;netstandard2.0;net6.0;net7.0 + net5;netstandard2.0;net6.0;net7.0;net8.0 true - 0.10.1 + 0.10.2 Deadpikle A progress ring control for Avalonia modeled after ModernWpf's ProgressRing control 2023 Deadpikle @@ -27,7 +27,7 @@ - + diff --git a/AvaloniaProgressRingSample/AvaloniaProgressRingSample.csproj b/AvaloniaProgressRingSample/AvaloniaProgressRingSample.csproj index e4e960c..2fc0a1d 100644 --- a/AvaloniaProgressRingSample/AvaloniaProgressRingSample.csproj +++ b/AvaloniaProgressRingSample/AvaloniaProgressRingSample.csproj @@ -12,12 +12,12 @@ - - - + + + - +