-
Notifications
You must be signed in to change notification settings - Fork 16
80 lines (79 loc) · 2.76 KB
/
publish.yml
File metadata and controls
80 lines (79 loc) · 2.76 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
name: Publish
on:
push:
branches: [main]
tags: ['*']
workflow_dispatch:
inputs:
verbosity:
description: 'Cake Build Verbosity'
required: true
default: 'Normal'
target:
description: 'Cake Build Target'
required: true
default: 'Publish'
force-docs:
description: 'Whether to force push the docs to GitHub Pages'
required: true
default: 'false'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
filter: tree:0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore tools
run: dotnet tool restore
- name: Run the build script
uses: cake-build/cake-action@v3
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
NUGET_API_URL: https://api.nuget.org/v3/index.json
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PAGES_ACCESS_TOKEN: ${{ secrets.GH_PAGES_ACCESS_TOKEN }}
NUGET_PRE_API_KEY: ${{ secrets.GITHUB_TOKEN }}
NUGET_PRE_API_URL: https://nuget.pkg.github.com/TrueLayer/index.json
TrueLayer__ClientId: ${{ secrets.TRUELAYER__CLIENTID }}
TrueLayer__ClientSecret: ${{ secrets.TRUELAYER__CLIENTSECRET }}
TrueLayer__Payments__SigningKey__KeyId: ${{ secrets.TRUELAYER__PAYMENTS__SIGNINGKEY__KEYID }}
TrueLayer2__ClientId: ${{ secrets.TRUELAYER__CLIENTID }}
TrueLayer2__ClientSecret: ${{ secrets.TRUELAYER__CLIENTSECRET }}
TrueLayer2__Payments__SigningKey__KeyId: ${{ secrets.TRUELAYER__PAYMENTS__SIGNINGKEY__KEYID }}
with:
cake-version: 5.1.0
target: ${{ github.event.inputs.target || 'Publish' }}
verbosity: ${{ github.event.inputs.verbosity || 'Normal' }}
arguments: |
force-docs: ${{ github.event.inputs.force-docs || 'false' }}
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: artifacts/*.TestResults.xml
retention-days: 30
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always() && github.actor != 'dependabot[bot]'
with:
files: artifacts/*.TestResults.xml
check_name: Test Results
comment_mode: off