Skip to content

fix: github actions files + CODEOWNERS #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
# From https://learn.microsoft.com/en-us/dotnet/devops/dotnet-test-github-action
name: build and test
name: Build and test

permissions:
contents: read

on:
push:
pull_request:
branches: [ master ]
branches: [master]
paths:
- '**.cs'
- '**.csproj'
- "**.cs"
- "**.csproj"

env:
DOTNET_VERSION: '6.0.401' # The .NET SDK version to use
DOTNET_VERSION: "6.0.401" # The .NET SDK version to use

jobs:
build-and-test:

name: build-and-test-${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
with:
persist-credentials: "false"

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install dependencies
run: dotnet restore
- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore
- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Test
run: dotnet test --no-restore --verbosity normal
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
name: release
name: Release csharp-ovh on Nuget

on:
push:
tags:
- *
- "*"

permissions:
contents: read

env:
DOTNET_VERSION: '6.0.401' # The .NET SDK version to use
DOTNET_VERSION: "6.0.401" # The .NET SDK version to use
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
NUGET_FEED_URL: https://api.nuget.org/v3/index.json
jobs:
publish:
name: Publish csharp-ovh on Nuget
runs-on: ubuntu-latest
needs: publish_binary
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
with:
persist-credentials: "false"

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install dependencies
run: dotnet restore

- name: Building Nuget package
run: dotnet pack -c Release csharp-ovh/csharp-ovh.csproj

- name: Publish nuget package to Nuget.org
run: |
dotnet nuget push ${{github.workspace}}/csharp-ovh/bin/Release/csharp-ovh.*.nupkg -s ${{ env.NUGET_FEED_URL }} -k ${{ env.NUGET_PUBLISH_KEY }} --skip-duplicate
echo "done publishing packages"
dotnet nuget push ${{github.workspace}}/csharp-ovh/bin/Release/csharp-ovh.*.nupkg -s "${{ env.NUGET_FEED_URL }}" -k "${{ env.NUGET_PUBLISH_KEY }}" --skip-duplicate
echo "done publishing packages"
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ovh/su-developer-platform-api-exposition
Loading