-
-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (75 loc) · 2.33 KB
/
build.yml
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
name: Build
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- develop
- hotfix/*
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
permissions:
contents: write
id-token: write
packages: write
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Get the sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install .NET SDK 7.0.x - 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
7.0.x
8.0.x
- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Run Cake script
uses: cake-build/cake-action@359a9f4da8412c68b42dee69ed5d581e7905fbd4
env:
NuGetReportSettings_SharedKey: ${{ secrets.NUGETREPORTSETTINGS_SHAREDKEY }}
NuGetReportSettings_WorkspaceId: ${{ secrets.NUGETREPORTSETTINGS_WORKSPACEID }}
GH_PACKAGES_NUGET_SOURCE: ${{ secrets.GH_PACKAGES_NUGET_SOURCE }}
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_AUTHORITY_HOST: "https://login.microsoftonline.com"
AZURE_DOMAIN: ${{ secrets.AZURE_DOMAIN }}
with:
cake-version: tool-manifest
target: GitHub-Actions
- name: Setup Pages
if: runner.os == 'Linux' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@v3
- name: Upload pages artifact
if: runner.os == 'Linux' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
with:
path: './artifacts/web/output'
deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1