Skip to content

Commit b19a8e4

Browse files
authored
Merge pull request #68 from ovh/release
fix: github actions files + CODEOWNERS
2 parents 67947fb + 79d0fe8 commit b19a8e4

File tree

3 files changed

+37
-29
lines changed

3 files changed

+37
-29
lines changed

.github/workflows/build-and-test.yml

+24-22
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
11
# 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
36

47
on:
58
push:
69
pull_request:
7-
branches: [ master ]
10+
branches: [master]
811
paths:
9-
- '**.cs'
10-
- '**.csproj'
12+
- "**.cs"
13+
- "**.csproj"
1114

1215
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
1417

1518
jobs:
1619
build-and-test:
17-
1820
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
2422
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 }}
3032

31-
- name: Install dependencies
32-
run: dotnet restore
33+
- name: Install dependencies
34+
run: dotnet restore
3335

34-
- name: Build
35-
run: dotnet build --configuration Release --no-restore
36+
- name: Build
37+
run: dotnet build --configuration Release --no-restore
3638

37-
- name: Test
38-
run: dotnet test --no-restore --verbosity normal
39+
- name: Test
40+
run: dotnet test --no-restore --verbosity normal

.github/workflows/release.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
1-
name: release
1+
name: Release csharp-ovh on Nuget
22

33
on:
44
push:
55
tags:
6-
- *
6+
- "*"
77

88
permissions:
99
contents: read
1010

1111
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
1313
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
1414
NUGET_FEED_URL: https://api.nuget.org/v3/index.json
1515
jobs:
1616
publish:
1717
name: Publish csharp-ovh on Nuget
1818
runs-on: ubuntu-latest
19-
needs: publish_binary
2019
steps:
2120
- name: Checkout Repo
2221
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
22+
with:
23+
persist-credentials: "false"
24+
2325
- name: Setup .NET Core
24-
uses: actions/setup-dotnet@v3
26+
uses: actions/setup-dotnet@v4
2527
with:
2628
dotnet-version: ${{ env.DOTNET_VERSION }}
29+
2730
- name: Install dependencies
2831
run: dotnet restore
32+
2933
- name: Building Nuget package
3034
run: dotnet pack -c Release csharp-ovh/csharp-ovh.csproj
35+
3136
- name: Publish nuget package to Nuget.org
3237
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"

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ovh/su-developer-platform-api-exposition

0 commit comments

Comments
 (0)