forked from getsentry/sentaur-leaderboard
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 1.93 KB
/
dotnet-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
name: .NET Build
on:
push:
branches:
- '**'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install wasm workload (macOS)
if: matrix.os == 'macos-latest'
run: sudo dotnet workload install wasm-tools
- name: install wasm workload (Windows/Linux)
if: matrix.os != 'macos-latest'
run: dotnet workload install wasm-tools
- run: dotnet build -c Release
- name: publish Web app
run: dotnet publish Sentaur.Leaderboard.Web -c Release -o webapp
- name: upload web app to artifact
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: webapp
if-no-files-found: error
retention-days: 10
path: |
${{ github.workspace }}/webapp/
deploy:
needs: build
if: ${{ github.ref == 'refs/heads/main' }}
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
concurrency:
group: "pages"
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: webapp
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'wwwroot'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4