Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Merge branch 'develop' of https://github.com/NetSparkleUpdater/NetSpa… #867

Merge branch 'develop' of https://github.com/NetSparkleUpdater/NetSpa…

Merge branch 'develop' of https://github.com/NetSparkleUpdater/NetSpa… #867

Workflow file for this run

name: Publish to NuGet
on:
push:
branches:
- "*"
pull_request:
# to update branch that publish happens on, edit the if: statement for the publish job
jobs:
test:
name: Unit testing
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Install NuGet / .NET on macOS as workaround
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
echo ''
elif [ "$RUNNER_OS" == "Windows" ]; then
echo ''
else
nuget help || brew install nuget -q
softwareupdate --install-rosetta --agree-to-license
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --architecture arm64 --channel 6.0
./dotnet-install.sh --architecture x64 --channel 6.0
./dotnet-install.sh --architecture arm64 --channel 7.0
./dotnet-install.sh --architecture x64 --channel 7.0
./dotnet-install.sh --architecture arm64 --channel 8.0
./dotnet-install.sh --architecture x64 --channel 8.0
./dotnet-install.sh --architecture arm64 --channel 9.0
./dotnet-install.sh --architecture x64 --channel 9.0
./dotnet-install.sh --architecture arm64 --channel 10.0
./dotnet-install.sh --architecture x64 --channel 10.0
fi
shell: bash
- uses: actions/checkout@v6.0.1
# - uses: nuget/setup-nuget@v2
# with:
# nuget-api-key: ${{secrets.NUGET_API_KEY}}
# nuget-version: '5.x'
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2.0.0
if: matrix.os == 'windows-latest'
- name: Setup .NET 6.0, 7.0, 8.0, 9.0, 10 for tests
uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x
- name: Run NetSparkle.Tests in .NET 4.6.2
run: dotnet test -f net462 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj
if: matrix.os == 'windows-latest'
- name: Run NetSparkle.Tests in .NET 6
run: dotnet test -f net6.0 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj
- name: Run NetSparkle.Tests.AppCastGenerator in .NET 6
run: dotnet test -f net6.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj
- name: Run NetSparkle.Tests in .NET 7
run: dotnet test -f net7.0 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj
- name: Run NetSparkle.Tests.AppCastGenerator in .NET 7
run: dotnet test -f net7.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj
- name: Run NetSparkle.Tests in .NET 8
run: dotnet test -f net8.0 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj
- name: Run NetSparkle.Tests.AppCastGenerator in .NET 8
run: dotnet test -f net8.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj
- name: Run NetSparkle.Tests in .NET 9
run: dotnet test -f net9.0 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj
- name: Run NetSparkle.Tests.AppCastGenerator in .NET 9
run: dotnet test -f net9.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj
- name: Run NetSparkle.Tests in .NET 10
run: dotnet test -f net10.0 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj
- name: Run NetSparkle.Tests.AppCastGenerator in .NET 10
run: dotnet test -f net10.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj
build:
name: Build all packages as smoke test
runs-on: windows-latest
needs: test
steps:
- uses: actions/checkout@v6.0.1
# - uses: nuget/setup-nuget@v2
# with:
# nuget-api-key: ${{secrets.NUGET_API_KEY}}
# nuget-version: '5.x'
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2.0.0
- name: Setup .NET 6.0, 7.0, 8.0, 9.0, 10.0
uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x
- name: Clean things to be safe
run: |
dotnet clean ${{ github.workspace }}/src/NetSparkle/NetSparkle.csproj --configuration Release
dotnet clean ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetCore/NetSparkle.UI.WinForms.NetCore.csproj --configuration Release
dotnet clean ${{ github.workspace }}/src/NetSparkle.UI.WPF/NetSparkle.UI.WPF.csproj --configuration Release
dotnet clean ${{ github.workspace }}/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj --configuration Release
dotnet clean ${{ github.workspace }}/src/NetSparkle.Tools.DSAHelper/NetSparkle.Tools.DSAHelper.csproj --configuration Release
msbuild ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.csproj /property:Configuration=Release /t:Clean /p:OutputPath=../../nuget/winformsnetframework/lib/net462
- name: Build NetSparkle in Release
run: dotnet build ${{ github.workspace }}/src/NetSparkle/NetSparkle.csproj --configuration Release
- name: Build NetSparkle.UI.WPF in Release
run: dotnet build ${{ github.workspace }}/src/NetSparkle.UI.WPF/NetSparkle.UI.WPF.csproj --configuration Release
- name: Build NetSparkle.UI.Avalonia in Release
run: dotnet build ${{ github.workspace }}/src/NetSparkle.UI.Avalonia/NetSparkle.UI.Avalonia.csproj --configuration Release
- name: Build NetSparkle.Tools.AppCastGenerator in Release
run: dotnet build ${{ github.workspace }}/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj --configuration Release -m:1
- name: Build NetSparkle.Tools.DSAHelper in Release
run: dotnet build ${{ github.workspace }}/src/NetSparkle.Tools.DSAHelper/NetSparkle.Tools.DSAHelper.csproj --configuration Release -m:1
- name: Build NetSparkle.UI.WinForms.NetCore in Release
run: dotnet build ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetCore/NetSparkle.UI.WinForms.NetCore.csproj --configuration Release
- name: Build NetSparkle.UI.WinForms.NetFramework in Release
run: |
msbuild ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.csproj /property:Configuration=Release /t:Restore /p:OutputPath=../../nuget/winformsnetframework/lib/net462 /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
msbuild ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.csproj /property:Configuration=Release /p:OutputPath=../../nuget/winformsnetframework/lib/net462 /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
publish:
name: Build and publish all packages to NuGet
runs-on: windows-latest
needs: build
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/avalonia-preview' || github.ref == 'refs/heads/versions/2.x'
steps:
- uses: actions/checkout@v6.0.1
- uses: nuget/setup-nuget@v2
with:
nuget-api-key: ${{secrets.NUGET_API_KEY}}
nuget-version: '5.x'
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2.0.0
- name: Setup .NET 6.0, 7.0, 8.0, 9.0, 10
uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x
- name: Publish NetSparkleUpdater.SparkleUpdater on version change
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
with:
PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle/NetSparkle.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: false # 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: NetSparkleUpdater.SparkleUpdater
INCLUDE_SYMBOLS: true
# TODO: Make this more maintainable using variables and stuff; then use in all package publishing so we stop using
# nitz/publish-nuget
# - name: Publish NetSparkleUpdater.UI.WinForms.NetCore on version change
# run: |
# dotnet build -c Release ${{ github.workspace }}/src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj
# dotnet pack -p:PackageID=NetSparkleUpdater.UI.WinForms.NetCore --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release ${{ github.workspace }}/src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj -o ${{ github.workspace }}/WinFormsNetCoreOutput
# dotnet nuget push ${{ github.workspace }}\WinFormsNetCoreOutput\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
# - name: Publish NetSparkleUpdater.UI.WinForms.NetFramework on version change
# run: |
# dotnet build -c Release ${{ github.workspace }}/src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj
# dotnet pack -p:PackageID=NetSparkleUpdater.UI.WinForms.NetFramework --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release ${{ github.workspace }}/src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj -o ${{ github.workspace }}/WinFormsNetFrameworkOutput
# dotnet nuget push ${{ github.workspace }}\WinFormsNetFrameworkOutput\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
- name: Clean and publish NetSparkleUpdater.UI.WinForms.NetFramework on version change
run: |
cd ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework
msbuild NetSparkle.UI.WinForms.NetFramework.csproj -t:clean /property:Configuration=Release
msbuild NetSparkle.UI.WinForms.NetFramework.csproj /property:Configuration=Release /t:Restore
msbuild NetSparkle.UI.WinForms.NetFramework.csproj /property:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
msbuild -t:pack /property:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
cd ${{ github.workspace }}/src/bin/Release/NetSparkle.UI.WinForms.NetFramework
nuget push *.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -verbosity detailed
cd ${{ github.workspace }}
- name: Publish NetSparkleUpdater.UI.WPF on version change
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
with:
PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle.UI.WPF/NetSparkle.UI.WPF.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: false # 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: NetSparkleUpdater.UI.WPF
INCLUDE_SYMBOLS: true
- name: Publish NetSparkleUpdater.UI.Avalonia on version change
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
with:
PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle.UI.Avalonia/NetSparkle.UI.Avalonia.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: false # 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: NetSparkleUpdater.UI.Avalonia
INCLUDE_SYMBOLS: true
- name: Publish NetSparkleUpdater.UI.WinForms.NetCore on version change
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
with:
PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetCore/NetSparkle.UI.WinForms.NetCore.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: false # 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: NetSparkleUpdater.UI.WinForms.NetCore
INCLUDE_SYMBOLS: true
# - name: Publish NetSparkleUpdater.UI.WinForms.NetFramework on version change
# uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
# with:
# PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.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: false # 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: NetSparkleUpdater.UI.WinForms.NetFramework
# INCLUDE_SYMBOLS: true
- name: Publish NetSparkleUpdater.Tools.DSAHelper
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
with:
PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle.Tools.DSAHelper/NetSparkle.Tools.DSAHelper.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: false # 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: NetSparkleUpdater.Tools.DSAHelper
INCLUDE_SYMBOLS: true
- name: Publish NetSparkleUpdater.Tools.AppCastGenerator
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
with:
PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.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: false # 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: NetSparkleUpdater.Tools.AppCastGenerator
INCLUDE_SYMBOLS: true
Morty Proxy This is a proxified and sanitized view of the page, visit original site.