Skip to content

Commit cc73901

Browse files
authored
Release build workflow (#797)
* Release build workflow * Release build - apply review comments - Rename workflow - Split artifact upload into packages and docs * Change artifact retention on release build
1 parent 4d258a2 commit cc73901

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/release_build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build release packages and documentation
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
CONFIGURATION: Release
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: |
24+
6.0.x
25+
7.0.x
26+
8.0.x
27+
28+
- name: Setup Ruby for documentation build
29+
uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: '3.2'
32+
bundler-cache: true
33+
34+
- name: Build package and docs
35+
run: dotnet run --project 'build/build.fsproj' -- -t All
36+
37+
- name: Upload packages
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: packages
41+
path: |
42+
bin/Release/NSubstitute/*.nupkg
43+
bin/Release/NSubstitute/*.snupkg
44+
retention-days: 7
45+
46+
- name: Upload documentation
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: docs
50+
path: |
51+
bin/Release/nsubstitute.github.com/
52+
retention-days: 7
53+
compression-level: 9

0 commit comments

Comments
 (0)