File tree 3 files changed +37
-29
lines changed
3 files changed +37
-29
lines changed Original file line number Diff line number Diff line change 1
1
# From https://learn.microsoft.com/en-us/dotnet/devops/dotnet-test-github-action
2
- name : build and test
2
+ name : Build and test
3
+
4
+ permissions :
5
+ contents : read
3
6
4
7
on :
5
8
push :
6
9
pull_request :
7
- branches : [ master ]
10
+ branches : [master]
8
11
paths :
9
- - ' **.cs'
10
- - ' **.csproj'
12
+ - " **.cs"
13
+ - " **.csproj"
11
14
12
15
env :
13
- DOTNET_VERSION : ' 6.0.401' # The .NET SDK version to use
16
+ DOTNET_VERSION : " 6.0.401" # The .NET SDK version to use
14
17
15
18
jobs :
16
19
build-and-test :
17
-
18
20
name : build-and-test-${{matrix.os}}
19
- runs-on : ${{ matrix.os }}
20
- strategy :
21
- matrix :
22
- os : [ubuntu-latest]
23
-
21
+ runs-on : ubuntu-latest
24
22
steps :
25
- - uses : actions/checkout@v3
26
- - name : Setup .NET Core
27
- uses : actions/setup-dotnet@v3
28
- with :
29
- dotnet-version : ${{ env.DOTNET_VERSION }}
23
+ - name : Checkout Repo
24
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
25
+ with :
26
+ persist-credentials : " false"
27
+
28
+ - name : Setup .NET Core
29
+ uses : actions/setup-dotnet@v4
30
+ with :
31
+ dotnet-version : ${{ env.DOTNET_VERSION }}
30
32
31
- - name : Install dependencies
32
- run : dotnet restore
33
+ - name : Install dependencies
34
+ run : dotnet restore
33
35
34
- - name : Build
35
- run : dotnet build --configuration Release --no-restore
36
+ - name : Build
37
+ run : dotnet build --configuration Release --no-restore
36
38
37
- - name : Test
38
- run : dotnet test --no-restore --verbosity normal
39
+ - name : Test
40
+ run : dotnet test --no-restore --verbosity normal
Original file line number Diff line number Diff line change 1
- name : release
1
+ name : Release csharp-ovh on Nuget
2
2
3
3
on :
4
4
push :
5
5
tags :
6
- - *
6
+ - " * "
7
7
8
8
permissions :
9
9
contents : read
10
10
11
11
env :
12
- DOTNET_VERSION : ' 6.0.401' # The .NET SDK version to use
12
+ DOTNET_VERSION : " 6.0.401" # The .NET SDK version to use
13
13
NUGET_PUBLISH_KEY : ${{ secrets.NUGET_PUBLISH_KEY }}
14
14
NUGET_FEED_URL : https://api.nuget.org/v3/index.json
15
15
jobs :
16
16
publish :
17
17
name : Publish csharp-ovh on Nuget
18
18
runs-on : ubuntu-latest
19
- needs : publish_binary
20
19
steps :
21
20
- name : Checkout Repo
22
21
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
22
+ with :
23
+ persist-credentials : " false"
24
+
23
25
- name : Setup .NET Core
24
- uses : actions/setup-dotnet@v3
26
+ uses : actions/setup-dotnet@v4
25
27
with :
26
28
dotnet-version : ${{ env.DOTNET_VERSION }}
29
+
27
30
- name : Install dependencies
28
31
run : dotnet restore
32
+
29
33
- name : Building Nuget package
30
34
run : dotnet pack -c Release csharp-ovh/csharp-ovh.csproj
35
+
31
36
- name : Publish nuget package to Nuget.org
32
37
run : |
33
- dotnet nuget push ${{github.workspace}}/csharp-ovh/bin/Release/csharp-ovh.*.nupkg -s ${{ env.NUGET_FEED_URL }} -k ${{ env.NUGET_PUBLISH_KEY }} --skip-duplicate
34
- echo "done publishing packages"
38
+ dotnet nuget push ${{github.workspace}}/csharp-ovh/bin/Release/csharp-ovh.*.nupkg -s " ${{ env.NUGET_FEED_URL }}" -k " ${{ env.NUGET_PUBLISH_KEY }}" --skip-duplicate
39
+ echo "done publishing packages"
Original file line number Diff line number Diff line change
1
+ * @ ovh/su-developer-platform-api-exposition
You can’t perform that action at this time.
0 commit comments