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: woodpeckerci/release:latest settings: api_key: ${GITEA_TOKEN} # Set your API key (GitHub, GitLab, etc.) target: 'MarioDB' # Replace with your project's name files: - release/main # Replace with your actual binary name when: branch: - main # Trigger release only on the main branch trigger: event: - push - pull_request