-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.52 KB
/
Copy pathci.yml
File metadata and controls
51 lines (42 loc) · 1.52 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
name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_dispatch:
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
Configuration: Release
jobs:
build-test-pack:
name: Build, test, and pack
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
10.0.x
- name: Restore
run: dotnet restore SafeWebCore.slnx
- name: Build
run: dotnet build SafeWebCore.slnx -c ${{ env.Configuration }} --no-restore --no-incremental
- name: Test
run: dotnet test SafeWebCore.slnx -c ${{ env.Configuration }} --verbosity normal
- name: Pack
run: |
mkdir -p artifacts/nupkg
dotnet pack src/SafeWebCore/SafeWebCore.csproj -c ${{ env.Configuration }} --no-build -o artifacts/nupkg
dotnet pack src/SafeWebCore.FraudDetection/SafeWebCore.FraudDetection.csproj -c ${{ env.Configuration }} --no-build -o artifacts/nupkg
dotnet pack src/SafeWebCore.Analyzers/SafeWebCore.Analyzers.csproj -c ${{ env.Configuration }} --no-build -o artifacts/nupkg
dotnet pack src/SafeWebCore.Testing/SafeWebCore.Testing.csproj -c ${{ env.Configuration }} --no-build -o artifacts/nupkg
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: nupkgs
path: artifacts/nupkg/*
if-no-files-found: error