-
Notifications
You must be signed in to change notification settings - Fork 12
60 lines (50 loc) · 1.64 KB
/
Copy pathDX.Data.yml
File metadata and controls
60 lines (50 loc) · 1.64 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
name: Publish DX.Data to nuget
on:
workflow_dispatch: {}
# push:
# branches:
# - master # Default release branch
jobs:
build:
name: build, pack
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '8.0.x' ]
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: add dx nuget source
run: dotnet nuget add source ${{secrets.DX_PRIVATE_NUGET}}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Run tests
run: dotnet test --no-restore --verbosity normal
- name: Pack
run: dotnet pack --configuration Release --no-restore --output ./nupkg
- name: Publish to NuGet
uses: actions/upload-artifact@v3
with:
name: nupkg
path: ./nupkg/*.nupkg
#- name: Publish the package to nuget.org
# run: dotnet nuget push */bin/Release/*.nupkg --skip-duplicate -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
# env:
# NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download package
uses: actions/download-artifact@v3
with:
name: nupkg
path: ./nupkg
- name: Publish to NuGet
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json