-
Notifications
You must be signed in to change notification settings - Fork 12
57 lines (50 loc) · 1.58 KB
/
release_unstable_nuget.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
name: Release_NUGET_Unstable
on:
push:
tags:
- "*.*.*-beta*"
- "*.*.*-rc*"
jobs:
publish_nuget:
name: Build and upload nuget artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@4
- name: Setup .NET Core 8.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
- name: Build with dotnet
run: |
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json rdb-tools.sln
- name: Pack with dotnet
run: |
ver=alpha`date +%Y%m%d%H%M%S`
dotnet pack src/RDBParser/RDBParser.csproj --version-suffix $ver -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/RDBCli/RDBCli.csproj --version-suffix $ver -o /home/runner/work/nugetpkgs -f net8.0 -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: nugetpkgs
path: /home/runner/work/nugetpkgs
release_nuget:
name: Release to Nuget
needs: publish_nuget
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: nugetpkgs
path: nugetpkgs
- name: list nugetpkgs
run: ls nugetpkgs
- name: Release
run: |
for file in nugetpkgs/*.nupkg
do
dotnet nuget push $file -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate -s https://www.nuget.org/api/v2/package
done