-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.8 KB
/
Library.yaml
File metadata and controls
68 lines (58 loc) · 1.8 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
name: Library
on:
push:
branches: [master]
paths-ignore:
- .github/dependabot.yml
- .vscode/**
- .editorconfig
- .gitignore
pull_request:
paths-ignore:
- .github/dependabot.yml
- .vscode/**
- .editorconfig
- .gitignore
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
library:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.2
- name: Setup .NET
uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: 9.0
- name: Lint dotnet
run: dotnet format --verify-no-changes --verbosity detailed
- name: Restore tools
run: dotnet tool restore
- name: Test
run: |
dotnet run --project Test
dotnet coverlet artifacts/bin/Test/debug/Test.dll \
--target='dotnet' \
--targetargs='run --project Test --no-build' \
--format=cobertura \
--threshold=100 \
--exclude-by-file='**/*.sg.cs' '**/*.g.cs' \
>> $GITHUB_STEP_SUMMARY
- name: Pack
run: |
TAG=$(date +%Y.%-m.%-d.)${{ github.run_number }}
REPOSITORYURL=${{ github.server_url }}/${{ github.repository }}
echo TAG=$TAG
echo REPOSITORYURL=$REPOSITORYURL
dotnet pack -p:PackageVersion=$TAG -p:RepositoryUrl=$REPOSITORYURL
- name: Publish
if: github.event_name == 'push' && !github.event.dryrun
run: |
dotnet nuget push artifacts/package/release/*.nupkg \
--api-key ${{ github.token }} \
--source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json \
--skip-duplicate \
--no-symbols