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