-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (50 loc) · 1.33 KB
/
dot-net.yaml
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: dot-net
on:
push:
branches:
- dot-net
tags:
- '*'
concurrency:
group: dot-net-${{ github.ref }}
cancel-in-progress: true
jobs:
build-libs:
name: dot-net for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Check dotnet
run: dotnet --info
- name: build nuget packages
shell: bash
run: |
cd scripts/
./run.sh
ls -lh packages
- uses: actions/upload-artifact@v2
name: upload nuget packages
with:
name: nuget-packages
path: scripts/packages/*.nupkg
- name: publish .Net packages to nuget.org
if: github.repository == 'csukuangfj/PortAudioSharp2'
shell: bash
env:
API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
# API_KEY is valid until 2024.07.01
cd scripts/packages
dotnet nuget push ./*.nupkg --skip-duplicate --api-key $API_KEY --source https://api.nuget.org/v3/index.json