From 7028cfe11dd8ffcd8f1107f65f0086b3437a437c Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 19 Sep 2026 17:48:09 +1000 Subject: [PATCH 1/2] add woodpecker CI and Makefile Build and test the plugin on every push and pull request, and give local builds the same commands plus the house version-bump targets. --- .woodpecker/ci.yaml | 28 ++++++++++++++++++++++++++++ Makefile | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .woodpecker/ci.yaml create mode 100644 Makefile diff --git a/.woodpecker/ci.yaml b/.woodpecker/ci.yaml new file mode 100644 index 0000000..c6fc9e6 --- /dev/null +++ b/.woodpecker/ci.yaml @@ -0,0 +1,28 @@ +when: + - event: pull_request + - event: push + +steps: + # Restore, build and test in one step so the NuGet cache stays on the step's + # own ephemeral storage instead of the workspace volume. + - name: build-test + image: mcr.microsoft.com/dotnet/sdk:10.0 + environment: + DOTNET_CLI_TELEMETRY_OPTOUT: "1" + DOTNET_NOLOGO: "1" + commands: + - dotnet --info + - dotnet restore SSO-Auth.sln + - dotnet build SSO-Auth.sln -c Release --no-restore --warnaserror + # No test project exists yet; this is a no-op until one lands. + - dotnet test SSO-Auth.sln -c Release --no-build --verbosity minimal + backend_options: + kubernetes: + serviceAccountName: jellyfin-plugin-sso + resources: + requests: + memory: 1Gi + cpu: 1 + limits: + memory: 4Gi + cpu: 2 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7644a35 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +.PHONY: build test lint clean patch minor major + +SLN ?= SSO-Auth.sln + +build: + dotnet restore $(SLN) + dotnet build $(SLN) -c Release --no-restore --warnaserror + +test: build + dotnet test $(SLN) -c Release --no-build --verbosity minimal + +lint: + dotnet format $(SLN) --verify-no-changes + +clean: + dotnet clean $(SLN) -c Release || true + rm -rf SSO-Auth/bin SSO-Auth/obj SSO-Auth/Lib/bin SSO-Auth/Lib/obj + +_LATEST := $(shell git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1) +_BASE := $(if $(_LATEST),$(_LATEST),v0.0.0) +_MAJ := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f1) +_MIN := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f2) +_PAT := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f3) + +patch: + @NEW=v$(_MAJ).$(_MIN).$(shell expr $(_PAT) + 1); \ + git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW + +minor: + @NEW=v$(_MAJ).$(shell expr $(_MIN) + 1).0; \ + git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW + +major: + @NEW=v$(shell expr $(_MAJ) + 1).0.0; \ + git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW -- 2.47.3 From 3dd5110c46a24851a327ed973ac8b80de47c9216 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 19 Sep 2026 22:20:14 +1000 Subject: [PATCH 2/2] run CI on pull requests only --- .woodpecker/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker/ci.yaml b/.woodpecker/ci.yaml index c6fc9e6..eec789e 100644 --- a/.woodpecker/ci.yaml +++ b/.woodpecker/ci.yaml @@ -1,6 +1,5 @@ when: - event: pull_request - - event: push steps: # Restore, build and test in one step so the NuGet cache stays on the step's -- 2.47.3