-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (69 loc) · 2.05 KB
/
Copy pathrelease-build.yml
File metadata and controls
84 lines (69 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Release-Build
permissions:
contents: write
pages: write
packages: write
actions: read
defaults:
run:
shell: pwsh
# only comes into play on a PUSH of a tag to the repository
on:
push:
tags:
- 'v*'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: true
jobs:
build_target:
runs-on: windows-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Build Source
run: .\Build-All.ps1
- name: Run Tests
run: ./Invoke-Tests.ps1
- name: Publish Test Results
uses: actions/upload-artifact@v4
with:
name: test-results
path: BuildOutput/Test-Results/*.trx
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: .\BuildOutput\Nuget
- name: Show asset names
run: dir BuildOutput/Nuget
- name: Build Docs
run: ./Build-Docs.ps1
- name: Commit Docs
env:
docspush_email: 32618965+cibuild-telliam@users.noreply.github.com
docspush_username: cibuild-telliam
run: .\Commit-Docs.ps1
- name: Publish Docs
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: .\BuildOutput\docs
branch: gh-pages
- name: Publish packages to NuGet.org
run: |
if( [string]::IsNullOrWhiteSpace('${{secrets.NUGETPUSH_ACCESS_TOKEN}}'))
{
throw "'NUGETPUSH_ACCESS_TOKEN' does not exist, is empty or all whitespace!"
}
dotnet nuget push .\BuildOutput\NuGet\*.nupkg --api-key '${{secrets.NUGETPUSH_ACCESS_TOKEN}}' --source 'https://api.nuget.org/v3/index.json' --skip-duplicate
- name: Create Release
if: (!cancelled())
uses: softprops/action-gh-release@v2
with:
draft: true
files: BuildOutput/NuGet/*.nupkg