Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason31569 committed Dec 20, 2024
2 parents 1941c3d + d0ff096 commit 48f7996
Show file tree
Hide file tree
Showing 93 changed files with 353 additions and 878 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/release_build.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/release_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release documentation
on:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x
- name: Setup docfx
run: dotnet tool install -g docfx

- name: Build documentation
run: docfx build
working-directory: ./docs

- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: docs
path: |
./docs/_site
retention-days: 7
compression-level: 9
27 changes: 27 additions & 0 deletions .github/workflows/release_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release packages
on:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Build package
run: dotnet pack src/NSubstitute/NSubstitute.csproj -p:CI=true

- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: packages
path: |
bin/Release/NSubstitute/*.nupkg
bin/Release/NSubstitute/*.snupkg
retention-days: 7
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build, Test, and Format
name: Build, Test, and Format verification
on:
push:
branches:
Expand All @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macOS-latest]
framework: [net8.0]
framework: [net9.0, net8.0]
include:
- os: windows-latest
framework: net462
Expand All @@ -24,6 +24,7 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x
- name: Build
Expand All @@ -37,24 +38,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x
# used for documentation
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Build all targets
run: build\build.cmd --target All
- name: Build documentation
run: dotnet run --project 'build/build.fsproj'

format-verify:
runs-on: ubuntu-latest
Expand All @@ -65,7 +58,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Format
run: dotnet format --verify-no-changes
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* [UPDATE] Update github actions steps versions
* [UPDATE] Remove legacy obsolete API
* [UPDATE] Mark as obsolete api CompatArg with pre c# 7.0 support

* [NEW] Added .NET 9 to test matrix
* [UPDATE] Migrate documentation to docfx platform. https://github.com/dotnet/docfx

### 5.3.0 (October 2024)

Expand Down
2 changes: 0 additions & 2 deletions NSubstitute.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0E2B9095
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{A8AF7D01-6CE4-47B2-9E23-689A53991C3D}"
ProjectSection(SolutionItems) = preProject
build\build.cmd = build\build.cmd
build\build.fs = build\build.fs
build\build.sh = build\build.sh
build\ExtractDocs.fs = build\ExtractDocs.fs
EndProjectSection
EndProject
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NSubstitute
========
[![Build status](https://github.com/nsubstitute/NSubstitute/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/nsubstitute/NSubstitute/actions/workflows/build_and_test.yml)
[![Build, Test, and Format verification](https://github.com/nsubstitute/NSubstitute/actions/workflows/test.yml/badge.svg)](https://github.com/nsubstitute/NSubstitute/actions/workflows/test.yml)
[![Nuget](https://img.shields.io/nuget/v/NSubstitute.svg)](https://www.nuget.org/packages/NSubstitute)

Visit the [NSubstitute website](https://nsubstitute.github.io) for more information.
Expand Down
1 change: 0 additions & 1 deletion build/ExtractDocs.fs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module ExtractDocs

open System
open System.IO
open System.Text.RegularExpressions

let LiquidTagRegex = @"```(?<tag>\w+)" + // Tag start with argument. e.g. "```csharp"
Expand Down
6 changes: 0 additions & 6 deletions build/build.cmd

This file was deleted.

Loading

0 comments on commit 48f7996

Please sign in to comment.