-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (52 loc) · 1.54 KB
/
Copy pathrelease.yml
File metadata and controls
67 lines (52 loc) · 1.54 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
61
62
63
64
65
66
67
name: Publish NuGet
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Unit tests
run: dotnet test ./tests/CPlugin.Net/CPlugin.Net.Tests.csproj -c Release --no-build
- name: Integration tests
run: dotnet test ./samples/Test/Example.Test.csproj -c Release
- name: Pack
run: |
VERSION=${GITHUB_REF#refs/tags/v}
dotnet pack \
src/Core/CPlugin.Net.csproj \
-c Release \
--no-build \
-p:Version=$VERSION
dotnet pack \
src/Attributes/CPlugin.Net.Attributes.csproj \
-c Release \
--no-build \
-p:Version=$VERSION
- name: NuGet login
uses: NuGet/login@v1
id: login
with:
user: pochi
- name: Publish
run: |
dotnet nuget push \
src/Core/bin/Release/*.nupkg \
--api-key ${{ steps.login.outputs.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json
dotnet nuget push \
src/Attributes/bin/Release/*.nupkg \
--api-key ${{ steps.login.outputs.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json