Add Woodpecker CI pipeline with semantic versioning

Pipeline stages:
- restore: Restore NuGet dependencies
- build: Build in Release mode
- test: Run test suite
- version: Determine version from git tags
- package-nuget: Create NuGet package (main branch)
- package-docker: Build multi-arch Docker image (tags only)
- release: Create GitHub release with artifacts (tags only)

Versioning:
- Tags (v1.0.0) → version 1.0.0
- Main branch → version X.Y.Z-dev.main.abc1234
- PRs → version X.Y.Z-dev.branch.abc1234

Docker image published to ghcr.io/barryw/paperlessmcp

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Barry Walker
2026-01-13 14:15:56 -05:00
parent 983c5c704c
commit e82c0cdb94
3 changed files with 139 additions and 5 deletions
+10 -5
View File
@@ -1,5 +1,6 @@
# Build stage
FROM mcr.microsoft.com/dotnet/sdk:10.0-preview AS build
ARG VERSION=0.0.0-dev
WORKDIR /src
# Copy project file and restore dependencies
@@ -8,12 +9,20 @@ RUN dotnet restore
# Copy source code and build
COPY . .
RUN dotnet publish -c Release -o /app/publish
RUN dotnet publish -c Release -o /app/publish /p:Version=${VERSION}
# Runtime stage
FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview AS runtime
ARG VERSION=0.0.0-dev
WORKDIR /app
# OCI Labels
LABEL org.opencontainers.image.title="PaperlessMCP"
LABEL org.opencontainers.image.description="Model Context Protocol server for Paperless-ngx"
LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.source="https://github.com/barryw/PaperlessMCP"
LABEL org.opencontainers.image.licenses="MIT"
# Copy published application
COPY --from=build /app/publish .
@@ -24,9 +33,5 @@ ENV MCP_PORT=5000
# Expose port for HTTP transport
EXPOSE 5000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:5000/mcp || exit 1
# Run the application (HTTP mode by default)
ENTRYPOINT ["dotnet", "PaperlessMCP.dll"]