-
Notifications
You must be signed in to change notification settings - Fork 25
47 lines (44 loc) · 1.22 KB
/
pr-ci.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
name: PR CI
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
paths-ignore:
- "**/*.md"
- "**/*.gitignore"
- "**/*.gitattributes"
- "**/*.yml"
env:
DOTNET_NOLOGO: 1
Configuration: Release
defaults:
run:
shell: pwsh
jobs:
build_and_publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
- run: dotnet --info
- run: dotnet tool restore
- run: dotnet restore
- run: dotnet build --no-restore
- run: dotnet test --no-build
- run: dotnet format --no-restore --verify-no-changes --verbosity normal
- name: Publish
run: dotnet publish src/Phalanx.App --output ./artifacts/publish-content --version-suffix "beta.pr.${{ github.run_number }}"
- name: Prepare artifacts
run: |
Compress-Archive ./artifacts/publish-content/wwwroot/* webapp.zip
Copy-Item $env:GITHUB_EVENT_PATH event.json
- name: Upload published artifact
uses: actions/upload-artifact@v4
with:
name: pr-data
path: |
webapp.zip
event.json
retention-days: 7