Skip to content
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

build(sdk-dotnet): Add dotnet job to release pipeline #1214

Merged
merged 10 commits into from
Dec 18, 2024
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,31 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npm publish --access public

sdk-dotnet:
runs-on: ubuntu-latest
needs:
- publish-docker
- prepare
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6'
- name: Bump version
env:
TAG: ${{ needs.prepare.outputs.tag }}
run: sed -i "s/<PackageVersion>.*<\/PackageVersion>/<PackageVersion>${TAG}<\/PackageVersion>/g" sdk-dotnet/LittleHorse.Sdk/LittleHorse.Sdk.csproj
- name: Build Project
run: dotnet build sdk-dotnet/LittleHorse.Sdk/LittleHorse.Sdk.csproj
- name: Create Package
run: dotnet pack --configuration Release sdk-dotnet/LittleHorse.Sdk/LittleHorse.Sdk.csproj
- name: Publish Package to nuget.org
run: dotnet nuget push sdk-dotnet/LittleHorse.Sdk/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}

lhctl:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -174,6 +199,7 @@ jobs:
- sdk-java
- sdk-python
- sdk-js
- sdk-dotnet
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,18 @@ jobs:
run: |
npm ci
npm run test

tests-sdk-dotnet:
if: ${{ !contains(github.event.head_commit.message, '[skip main]') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6'
- name: Build Project
run: dotnet build sdk-dotnet/LittleHorse.Sdk/LittleHorse.Sdk.csproj
- name: Test Dotnet
run: dotnet test sdk-dotnet/LittleHorse.Sdk.Tests
4 changes: 1 addition & 3 deletions sdk-dotnet/LittleHorse.Sdk/LittleHorse.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyVersion>0.5.8</AssemblyVersion>
<FileVersion>0.5.8</FileVersion>
<PackageVersion>0.5.8-alpha</PackageVersion>
<PackageVersion>0.0.0</PackageVersion>
<Company>LittleHorse Enterprises LLC</Company>
<Authors>LittleHorse Enterprises LLC</Authors>
<Product>LittleHorseSDK</Product>
Expand Down
Loading