Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Build and publish

on:
push:
branches: [ master ]
tags: [ 'v*' ] # pushing a tag like v2.0.0 publishes version 2.0.0 to nuget.org
pull_request:
workflow_dispatch:

permissions:
contents: read

env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
build:
# net48 and Windows Forms targets require a Windows runner.
runs-on: windows-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x

- name: Determine package version
id: version
shell: pwsh
run: |
if ($env:GITHUB_REF -like 'refs/tags/v*') {
$version = $env:GITHUB_REF_NAME.Substring(1)
} else {
# Non-release builds get a unique prerelease version; they are built and uploaded as artifacts only.
[xml]$project = Get-Content CrashReporter.NET/CrashReporter.NET.csproj
$base = ($project.Project.PropertyGroup | Where-Object { $_.Version } | Select-Object -First 1).Version
$version = "$base-ci.$env:GITHUB_RUN_NUMBER"
}
"version=$version" >> $env:GITHUB_OUTPUT
Write-Host "Package version: $version"

- name: Restore
run: dotnet restore CrashReporter.NET.sln

- name: Build
run: dotnet build CrashReporter.NET.sln -c Release --no-restore -p:Version=${{ steps.version.outputs.version }} -p:ContinuousIntegrationBuild=true

- name: Pack
run: dotnet pack CrashReporter.NET/CrashReporter.NET.csproj -c Release --no-build -p:Version=${{ steps.version.outputs.version }} -o artifacts

- uses: actions/upload-artifact@v7
with:
name: packages
path: |
artifacts/*.nupkg
artifacts/*.snupkg
if-no-files-found: error

publish:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
# Optional: add protection rules (e.g. required reviewers) to this environment in the repository settings.
environment: release
permissions:
id-token: write # required to request the GitHub OIDC token used by NuGet trusted publishing
contents: read
steps:
- uses: actions/download-artifact@v8
with:
name: packages
path: artifacts

- uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x

# Exchanges the GitHub OIDC token for a short-lived (1 hour) nuget.org API key.
- name: NuGet login (OIDC → temporary API key)
id: login
uses: NuGet/login@v1
with:
user: ${{ secrets.NUGET_USER }} # nuget.org profile name (not e-mail)

# Pushing the .nupkg also pushes the matching .snupkg symbol package.
- name: Push to nuget.org
shell: bash
run: dotnet nuget push "artifacts/*.nupkg" --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
1 change: 0 additions & 1 deletion CrashReporter.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CrashReporterWPFTest", "Cra
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{475926B8-4252-47B1-BD51-FD60F5445535}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
LICENSE = LICENSE
nuget.config = nuget.config
README.md = README.md
Expand Down
20 changes: 14 additions & 6 deletions CrashReporter.NET/CrashReporter.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
</PropertyGroup>

<PropertyGroup>
<!-- Default version for local builds; CI overrides it from the v* release tag (see .github/workflows/publish.yml). -->
<Version>2.0.0</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<Company>RBSoft</Company>
<Product>CrashReporter.NET</Product>
<AssemblyTitle>CrashReporter.NET</AssemblyTitle>
Expand All @@ -27,12 +26,17 @@
</PropertyGroup>

<PropertyGroup>
<PackageId>CrashReporter.NET.Official</PackageId>
<PackageId>d3sync.CrashReporter.NET</PackageId>
<Title>CrashReporter.NET</Title>
<Authors>RBSoft</Authors>
<Authors>RBSoft, d3sync</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/ravibpatel/CrashReporter.NET</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/ravibpatel/CrashReporter.NET/releases</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/d3sync/CrashReporter.NET</PackageProjectUrl>
<RepositoryUrl>https://github.com/d3sync/CrashReporter.NET</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>https://github.com/d3sync/CrashReporter.NET/releases</PackageReleaseNotes>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Description>Send crash reports of your desktop application developed using .NET 10 or .NET Framework 4.8 directly to your mail's inbox with full exception report, stack trace and screenshot.</Description>
<PackageTags>exception reporter crash inbox email C# VB.NET WinForms WPF</PackageTags>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand All @@ -43,6 +47,10 @@
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<PackageReference Include="System.Resources.Extensions" Version="10.0.0" />
<Reference Include="System.Deployment" />
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CrashReporter.NET

[![AppVeyor branch](https://img.shields.io/appveyor/ci/gruntjs/grunt/master.svg)](https://ci.appveyor.com/project/ravibpatel/crashreporter-net)
[![Build and publish](https://github.com/d3sync/CrashReporter.NET/actions/workflows/publish.yml/badge.svg)](https://github.com/d3sync/CrashReporter.NET/actions/workflows/publish.yml)

Send crash reports of your desktop application developed using .NET 10 or .NET Framework directly to your mail's inbox with full exception report, stack trace and screenshot.

Expand All @@ -20,10 +20,10 @@ Version 2.0 is a breaking release:
* Failed reports saved by `SaveFailedReport()` are now stored as `failed-report-*.xml` instead of `BinaryFormatter` based `.bin` files, because `BinaryFormatter` is no longer available on .NET 9+. Old `.bin` files are not retried.
* Translations are now shipped as standard satellite assemblies (`de\CrashReporter.NET.resources.dll`, etc.) instead of being embedded in `CrashReporter.NET.dll`. Deploy the culture folders along with your application.

## The nuget package [![NuGet](https://img.shields.io/nuget/v/CrashReporter.NET.Official.svg)](https://www.nuget.org/packages/CrashReporter.NET.Official/) [![NuGet](https://img.shields.io/nuget/dt/CrashReporter.NET.Official.svg)](https://www.nuget.org/packages/CrashReporter.NET.Official/)
## The nuget package [![NuGet](https://img.shields.io/nuget/v/d3sync.CrashReporter.NET.svg)](https://www.nuget.org/packages/d3sync.CrashReporter.NET/) [![NuGet](https://img.shields.io/nuget/dt/d3sync.CrashReporter.NET.svg)](https://www.nuget.org/packages/d3sync.CrashReporter.NET/)

````powershell
PM> Install-Package CrashReporter.NET.Official
PM> Install-Package d3sync.CrashReporter.NET
````

## How it works
Expand Down
49 changes: 0 additions & 49 deletions appveyor.yml

This file was deleted.

Loading