-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (36 loc) · 1.14 KB
/
deploy.yml
File metadata and controls
44 lines (36 loc) · 1.14 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
name: Nuget Build
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: setup dotnet
id: dotnet
uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: 8.0.x
# Note: Unless a concrete version is specified in the `global.json` file,
# the latest .NET version installed on the runner (including preinstalled
# versions) will be used by default. To control this behavior, you may want
# to use temporary `global.json` files.
# https://github.com/actions/setup-dotnet/blob/main/README.md#matrix-testing
- name: Create `global.json`
run: |
echo '{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}' > ./global.json
- name: test
timeout-minutes: 10
run: |
dotnet test --filter Category!=Dependencies
- name: pack
run: |
dotnet pack -c Release
- name: publish
run: |
dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.nuget }}