-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (86 loc) · 4.13 KB
/
publish-nuget.yml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Build and Publish NuGet
on:
push:
tags:
- "v*"
jobs:
build_asv-audio:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET for Asv.Audio
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore ./src
- name: Build
run: dotnet build ./src/Asv.Audio.sln --configuration Release --no-restore
- name: Run tests
run: dotnet test ./src/Asv.Audio.sln --no-restore --filter FullyQualifiedName~Asv.Audio.Test
- name: Set version variable
env:
TAG: ${{ github.ref_name }}
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Pack package
run: dotnet pack ./src/Asv.Audio/Asv.Audio.csproj -c Release /p:Version=${VERSION} --no-build -o .
- name: List output files
run: ls -la
- name: Push package to GitHub
run: dotnet nuget push Asv.Audio.${VERSION}.nupkg --api-key ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }} --skip-duplicate --source "https://nuget.pkg.github.com/asv-soft/index.json"
- name: Push package to Nuget
run: dotnet nuget push Asv.Audio.${VERSION}.nupkg --api-key ${{ secrets.NUGET_AUTH_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json
build_asv-audio-codec-opus:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET for Asv.Audio.Codec.Opus
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore ./src
- name: Build
run: dotnet build ./src/Asv.Audio.sln --configuration Release --no-restore
- name: Set version variable
env:
TAG: ${{ github.ref_name }}
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Pack package
run: dotnet pack ./src/Asv.Audio.Codec.Opus/Asv.Audio.Codec.Opus.csproj -c Release /p:Version=${VERSION} --no-build -o .
- name: List output files
run: ls -la
- name: Push package to GitHub
run: dotnet nuget push Asv.Audio.Codec.Opus.${VERSION}.nupkg --api-key ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }} --skip-duplicate --source "https://nuget.pkg.github.com/asv-soft/index.json"
- name: Push package to Nuget
run: dotnet nuget push Asv.Audio.Codec.Opus.${VERSION}.nupkg --api-key ${{ secrets.NUGET_AUTH_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json
build_asv-audio-source-windows:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET for Asv.Audio.Source.Windows
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore ./src
- name: Build
run: dotnet build ./src/Asv.Audio.sln --configuration Release --no-restore
- name: Set version variable
env:
TAG: ${{ github.ref_name }}
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Pack package
run: dotnet pack ./src/Asv.Audio.Source.Windows/Asv.Audio.Source.Windows.csproj -c Release /p:Version=${VERSION} --no-build -o .
- name: List output files
run: ls -la
- name: Push package to GitHub
run: dotnet nuget push Asv.Audio.Source.Windows.${VERSION}.nupkg --api-key ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }} --skip-duplicate --source "https://nuget.pkg.github.com/asv-soft/index.json"
- name: Push package to Nuget
run: dotnet nuget push Asv.Audio.Source.Windows.${VERSION}.nupkg --api-key ${{ secrets.NUGET_AUTH_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json