-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (108 loc) · 3.19 KB
/
default.yml
File metadata and controls
131 lines (108 loc) · 3.19 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: default
on:
pull_request:
branches:
- main
release:
types: [published]
workflow_dispatch:
env:
DOTNET_NOLOGO: true
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
jobs:
build:
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: recursive
- name: setup node
uses: actions/setup-node@v6
with:
cache: npm
cache-dependency-path: ./**/package-lock.json
node-version: 24.x
- name: setup dotnet
uses: actions/setup-dotnet@v5
with:
cache: true
cache-dependency-path: src/**/packages.lock.json
global-json-file: global.json
- name: install workloads
run: dotnet workload restore && dotnet workload install wasm-tools
- name: restore
run: dotnet restore --locked-mode
- name: build
run: dotnet build src/App/Web/ManagedDoom.App.Web.csproj --no-restore
publish:
if: github.event_name == 'release' && github.event.action == 'published'
needs: [build]
permissions:
checks: write
contents: write
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
submodules: recursive
- name: setup node
uses: actions/setup-node@v6
with:
cache: npm
cache-dependency-path: ./**/package-lock.json
node-version: 24.x
- name: setup dotnet
uses: actions/setup-dotnet@v5
with:
cache: true
cache-dependency-path: src/**/packages.lock.json
global-json-file: global.json
- name: install workloads
run: dotnet workload restore && dotnet workload install wasm-tools
- name: restore
run: dotnet restore --locked-mode
- name: publish
run: dotnet publish src/App/Web/ManagedDoom.App.Web.csproj -o managed-doom-web -c Release -r linux-x64 --self-contained --no-restore && zip -r managed-doom-web-${{ github.event.release.tag_name }}.zip managed-doom-web
- name: upload artifact
uses: actions/upload-artifact@v5
with:
name: managed-doom-web
path: managed-doom-web
- name: update release
uses: softprops/action-gh-release@v2
with:
files: managed-doom-web-${{ github.event.release.tag_name }}.zip
deploy:
concurrency: live
environment: live
needs: [publish]
permissions:
contents: read
deployments: write
runs-on: ubuntu-latest
steps:
- name: download artifact
uses: actions/download-artifact@v6
with:
name: managed-doom-web
path: managed-doom-web
- name: az login
uses: azure/login@v2
with:
creds: ${{ secrets.MANAGED_DOOM_DEPLOY_RBAC }}
- name: deploy app service
uses: azure/webapps-deploy@v3
with:
app-name: managed-doom
clean: true
package: managed-doom-web
restart: true
- name: az logout
run: az logout