3 Commits

Author SHA1 Message Date
de548946f7 CI: Setup dotnet SDK before running automatic build
Some checks failed
/ build (push) Failing after 1m31s
2025-05-17 14:07:18 +02:00
d967449889 CI: Add CI branch as trigger for testing
Some checks failed
/ build (push) Failing after 48s
2025-05-14 21:50:56 +02:00
02a845c711 Add CI scripts to build the module automatically 2025-05-14 21:07:34 +02:00
2 changed files with 72 additions and 0 deletions

37
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,37 @@
on:
push:
branches:
- main
- ci
pull_request:
branches:
- main
- ci
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout Module
uses: https://github.com/actions/checkout@v4
with:
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: LS
run: ls -lisa
- 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
run: dotnet test ./Module.EventRegistration/SZUAbsolventenverein.Module.EventRegistration.sln --configuration Release --no-build

View File

@ -0,0 +1,35 @@
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Set VERSION variable from tag
run: echo "VERSION=${GITEA_REF/refs\/tags\/v/}" >> $GITEA_ENV
- name: Setup Dotnet SDK
uses: https://github.com/actions/setup-dotnet@v4
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
- uses: https://github.com/actions/upload-artifact@v4
with:
name: nuget
if-no-files-found: error
retention-days: 7
path: ./*.nupkg