update
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/discord-noti Pipeline was successful
ci/woodpecker/push/release Pipeline failed

This commit is contained in:
Sebastian Ranoszek 2025-04-04 16:00:34 +02:00
parent 2946cee5c8
commit 49c53e385f
4 changed files with 27 additions and 42 deletions

9
.woodpecker/build.yaml Normal file
View file

@ -0,0 +1,9 @@
steps:
# Step 1: Build the project
- name: Build
image: debian:stable-slim
commands:
- apt-get update
- apt-get install -y gcc
- echo "Building project..."
- g++ -o build/main main.cpp

View file

@ -1,42 +0,0 @@
steps:
# Step 1: Build and Test the C++ Project
- name: build
image: gcc:latest
environment:
CC: gcc
CXX: g++
commands:
# Install CMake
- apt-get update && apt-get install -y cmake
# Cache CMake dependencies
- cmake -DCMAKE_BUILD_TYPE=Release -Bbuild -H.
- cmake --build build --target all
- ls -l build/main
# Run tests
- cd build && ctest --output-on-failure
# Create the release directory
- mkdir -p release
- cp /woodpecker/src/git.xyro.win/nyosic/MarioDB/build/main release/
# Step 3: Upload Release Artifact
- name: release
image: woodpecker-plugins/release
environment:
GITEA_URL: "https://git.xyro.win"
GITEA_TOKEN: "${GITEA_TOKEN}" # Make sure to set this secret in the Woodpecker UI
REPO_NAME: "MarioDB" # Replace with your actual repository name
TAG_NAME: "${CI_COMMIT_REF}" # Use the commit reference (tag name)
ASSET_PATH: "release/main" # Path to the compiled C++ binary
when:
event:
- tag # Trigger release only on the main branch
trigger:
event:
- push
- pull_request

View file

@ -0,0 +1,6 @@
steps:
- name: discord notification
image: appleboy/drone-discord
settings:
webhook_id: 1357683988373704824
webhook_token: wtAZM1Ps4upFV0Z5_HJKzWkJ19-lj0tagEwPofOJN4O3OHuET309RTkKQgakDWVrl0Ml

12
.woodpecker/release.yaml Normal file
View file

@ -0,0 +1,12 @@
steps:
release-helper:
image: woodpeckerci/plugin-ready-release-go
settings:
# release_branch: 'custom-release-branch' # default: CI_REPO_DEFAULT_BRANCH
git_email: <email>
forge_token:
from_secret: GITEA_TOKEN
when:
event: push
branch: ${CI_REPO_DEFAULT_BRANCH}