Skip to content
Open
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
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release
on:
workflow_dispatch:
inputs:
version:
description: Nuget package version
required: true
type: string
publish:
description: Publish to nuget
type: boolean
required: true
default: false
run-name: Release ${{ inputs.version }}

jobs:
pack-and-publish:
runs-on: windows-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x

- name: Build package
run: dotnet pack ./Castle.Core.slnx -p:Version=${{ inputs.version }} -o ./artifacts -p:CI=true

- name: Make explicit versions for nuget packages
run: dotnet run --project .\tools\Explicit.NuGet.Versions\Explicit.NuGet.Versions.csproj ".\artifacts" "castle."

- name: Upload nuget package
uses: actions/upload-artifact@v6
with:
compression-level: 0 # nupkg files are already compressed
name: nupkg
path: artifacts/*nupkg

- name: NuGet login
if: inputs.publish
uses: NuGet/login@v1
id: login
with:
user: castleproject

- name: Push to NuGet.org
if: inputs.publish
run: dotnet nuget push artifacts\*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate
Copy link
Author

@304NotModified 304NotModified Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Enhancements:
- Restore ability on .NET 9 and later to save dynamic assemblies to disk using `PersistentProxyBuilder` (@stakx, #718)
- Configure SourceLink & `.snupkg` symbols package format (@Romfos, #722)
- Support for C# `with { ... }` expressions. Cloning a record proxy using `with` now produces another proxy of the same type (instead of an instance of the proxied type, as before). The cloning process can still be changed by intercepting the record class' `<Clone>$` method. (@stakx, #733)
- Moved to GitHub Actions and NuGet Trusted Publishing, removed old build scripts (@Romfos, @304NotModified, #740)
- Dependencies were updated

Bugfixes:
Expand Down
4 changes: 1 addition & 3 deletions Castle.Core.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
<File Path=".editorconfig" />
<File Path=".gitattributes" />
<File Path=".gitignore" />
<File Path="appveyor.yml" />
<File Path="build.cmd" />
<File Path="build.sh" />
<File Path="buildscripts/common.props" />
<File Path="CHANGELOG.md" />
<File Path="CONTRIBUTING.md" />
Expand All @@ -14,6 +11,7 @@
</Folder>
<Folder Name="/Castle Build/GitHub Actions/">
<File Path=".github/workflows/build.yml" />
<File Path=".github/workflows/release.yml" />
</Folder>
<Folder Name="/Castle Services/">
<Project Path="src/Castle.Services.Logging.EventLogIntegration/Castle.Services.Logging.EventLogIntegration.csproj" />
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,10 @@ Running the unit tests additionally requires the .NET Framework 4.6.2+ and the .
|-----------------|------------|
| Windows & Linux | [Preview Feed](https://ci.appveyor.com/nuget/core-0mhe40ifodk8)

### On Windows
### On Windows/linux/macOS

```
build.cmd
```

### On Linux

```
./build.sh
dotnet build Castle.Core.slnx
```

:information_source: **Mono runtime support:** We used to run tests on the Mono 6.0 runtime, but stopped doing so as the project has been deprecated. See the official announcement on [the Mono homepage](https://www.mono-project.com/).
Expand Down
91 changes: 0 additions & 91 deletions appveyor.yml

This file was deleted.

17 changes: 0 additions & 17 deletions build.cmd

This file was deleted.

66 changes: 0 additions & 66 deletions build.sh

This file was deleted.

55 changes: 0 additions & 55 deletions buildscripts/build.cmd

This file was deleted.

7 changes: 3 additions & 4 deletions buildscripts/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/castleproject/Core</RepositoryUrl>
<BuildVersion>0.0.0</BuildVersion>
<BuildVersion Condition="'$(APPVEYOR_BUILD_VERSION)'!=''">$(APPVEYOR_BUILD_VERSION)</BuildVersion>
<BuildVersion Condition="'$(Version)'!=''">$(Version)</BuildVersion>
<BuildVersionMajor>$(BuildVersion.Split('.')[0])</BuildVersionMajor>
<BuildVersionNoSuffix>$(BuildVersion.Split('-')[0])</BuildVersionNoSuffix>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -27,9 +27,6 @@
<PackageIconUrl>http://www.castleproject.org/img/castle-logo.png</PackageIconUrl>
<PackageIcon>castle-logo.png</PackageIcon>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageVersion>$(BuildVersion)</PackageVersion>
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>false</IncludeSource>
<CurrentYear>$([System.DateTime]::Now.ToString("yyyy"))</CurrentYear>
<Copyright>Copyright (c) 2004-$(CurrentYear) Castle Project - http://www.castleproject.org/ </Copyright>
<ContentTargetFolders>.</ContentTargetFolders>
Expand All @@ -39,6 +36,8 @@
<!--Deterministic Build and Source Link settings -->
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/Castle.Core/Castle.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

<PropertyGroup>
<PackageId>Castle.Core</PackageId>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageOutputPath>../../build/</PackageOutputPath>
<AssemblyName>Castle.Core</AssemblyName>
<RootNamespace>Castle</RootNamespace>
<AssemblyTitle>Castle Core</AssemblyTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

<PropertyGroup>
<PackageId>Castle.Core-DiagnosticsLogger</PackageId>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageOutputPath>../../build/</PackageOutputPath>
<AssemblyName>Castle.Services.Logging.EventLogIntegration</AssemblyName>
<RootNamespace>Castle.Services.Logging.EventLogIntegration</RootNamespace>
<AssemblyTitle>Castle Windows EventLog integration</AssemblyTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

<PropertyGroup>
<PackageId>Castle.Core-NLog</PackageId>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageOutputPath>../../build/</PackageOutputPath>
<AssemblyName>Castle.Services.Logging.NLogIntegration</AssemblyName>
<RootNamespace>Castle.Services.Logging.NLogIntegration</RootNamespace>
<AssemblyTitle>Castle NLog integration</AssemblyTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

<PropertyGroup>
<PackageId>Castle.Core-Serilog</PackageId>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageOutputPath>../../build/</PackageOutputPath>
<AssemblyName>Castle.Services.Logging.SerilogIntegration</AssemblyName>
<RootNamespace>Castle.Services.Logging.SerilogIntegration</RootNamespace>
<AssemblyTitle>Castle Serilog integration</AssemblyTitle>
Expand Down
Loading