forked from web-push-libs/web-push-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.39 KB
/
Copy pathdotnet.yml
File metadata and controls
59 lines (47 loc) · 1.39 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: 🏭 Build nuget
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
env:
DOTNET_VERSION: "10.x"
NUGET_PACKAGE_NAME: "ClosureOSS.WebPush"
permissions:
contents: write
pull-requests: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4.7.0
- name: Determine Version
id: meta
uses: gittools/actions/gitversion/execute@v4.7.0
- name: Restore dependencies
run: dotnet restore --locked-mode
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build -c Release --verbosity normal
- name: Upload Nuget package as Artifact
uses: actions/upload-artifact@v7
with:
name: ${{ env.NUGET_PACKAGE_NAME }}.${{ steps.meta.outputs.SemVer }}
path: ./artifacts/package/release/*nupkg
retention-days: 1