CI: Setup dotnet SDK before running automatic build
Some checks failed
/ build (push) Failing after 1m32s

This commit is contained in:
Konstantin Hintermayer 2025-05-14 21:56:48 +02:00 committed by KoCoder
parent d967449889
commit 75eb0f199a
3 changed files with 30 additions and 5 deletions

View File

@ -13,9 +13,28 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- name: Checkout - name: Checkout Module
uses: https://github.com/actions/checkout@v4 uses: https://github.com/actions/checkout@v4
- name: Build with:
run: dotnet build --configuration Release path: Module.EventRegistration
- name: Checkout Oqtane
uses: https://github.com/actions/checkout@v4
with:
repository: Diplomarbeit-Absolventenverein/oqtane.framework
path: oqtane.framework
ref: v6.1.1
- name: Setup Dotnet SDK
uses: https://github.com/actions/setup-dotnet@v4
with:
dotnet-version: '9.x'
# - name: Setup NuGet
# uses: https://github.com/nuget/setup-nuget@v2
# with:
# nuget-api-key: ${{ secrets.NuGetAPIKey }}
# nuget-version: '5.x'
- name: Build Oqtane
run: dotnet build ./oqtane.framework/Oqtane.sln --configuration Debug
- name: Build Module
run: dotnet build ./Module.EventRegistration/SZUAbsolventenverein.Module.EventRegistration.sln --configuration Release
- name: Test - name: Test
run: dotnet test --configuration Release --no-build run: dotnet test ./Module.EventRegistration/SZUAbsolventenverein.Module.EventRegistration.sln --configuration Release --no-build

View File

@ -19,6 +19,8 @@ jobs:
git branch --remote --contains | grep origin/main git branch --remote --contains | grep origin/main
- name: Set VERSION variable from tag - name: Set VERSION variable from tag
run: echo "VERSION=${GITEA_REF/refs\/tags\/v/}" >> $GITEA_ENV run: echo "VERSION=${GITEA_REF/refs\/tags\/v/}" >> $GITEA_ENV
- name: Setup Dotnet SDK
uses: https://github.com/actions/setup-dotnet@v4
- name: Build - name: Build
run: dotnet build --configuration Release /p:Version=${VERSION} run: dotnet build --configuration Release /p:Version=${VERSION}
- name: Test - name: Test

View File

@ -1,5 +1,9 @@
TargetFramework=$1 TargetFramework=$1
ProjectName=$2 ProjectName=$2
"..\..\oqtane.framework\oqtane.package\nuget.exe" pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName% chmod +x ../../oqtane.framework/Oqtane.Package/nuget.exe
# "../../oqtane.framework/Oqtane.Package/nuget.exe" pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName%
# https://learn.microsoft.com/en-us/nuget/reference/dotnet-commands
dotnet pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName%
cp -f "*.nupkg" "..\..\oqtane.framework\Oqtane.Server\Packages\" cp -f "*.nupkg" "..\..\oqtane.framework\Oqtane.Server\Packages\"