-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release build workflow * Release build - apply review comments - Rename workflow - Split artifact upload into packages and docs * Change artifact retention on release build
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build release packages and documentation | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
CONFIGURATION: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
6.0.x | ||
7.0.x | ||
8.0.x | ||
- name: Setup Ruby for documentation build | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2' | ||
bundler-cache: true | ||
|
||
- name: Build package and docs | ||
run: dotnet run --project 'build/build.fsproj' -- -t All | ||
|
||
- name: Upload packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: packages | ||
path: | | ||
bin/Release/NSubstitute/*.nupkg | ||
bin/Release/NSubstitute/*.snupkg | ||
retention-days: 7 | ||
|
||
- name: Upload documentation | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: | | ||
bin/Release/nsubstitute.github.com/ | ||
retention-days: 7 | ||
compression-level: 9 |