From 49c53e385f436d05253e33193d819d79cb013474 Mon Sep 17 00:00:00 2001 From: Sebastian Ranoszek Date: Fri, 4 Apr 2025 16:00:34 +0200 Subject: [PATCH] update --- .woodpecker/build.yaml | 9 ++++++++ .woodpecker/default.yml | 42 ----------------------------------- .woodpecker/discord-noti.yaml | 6 +++++ .woodpecker/release.yaml | 12 ++++++++++ 4 files changed, 27 insertions(+), 42 deletions(-) create mode 100644 .woodpecker/build.yaml delete mode 100644 .woodpecker/default.yml create mode 100644 .woodpecker/discord-noti.yaml create mode 100644 .woodpecker/release.yaml diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml new file mode 100644 index 0000000..e3cc8ad --- /dev/null +++ b/.woodpecker/build.yaml @@ -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 \ No newline at end of file diff --git a/.woodpecker/default.yml b/.woodpecker/default.yml deleted file mode 100644 index a94a2eb..0000000 --- a/.woodpecker/default.yml +++ /dev/null @@ -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 diff --git a/.woodpecker/discord-noti.yaml b/.woodpecker/discord-noti.yaml new file mode 100644 index 0000000..37f64b1 --- /dev/null +++ b/.woodpecker/discord-noti.yaml @@ -0,0 +1,6 @@ +steps: + - name: discord notification + image: appleboy/drone-discord + settings: + webhook_id: 1357683988373704824 + webhook_token: wtAZM1Ps4upFV0Z5_HJKzWkJ19-lj0tagEwPofOJN4O3OHuET309RTkKQgakDWVrl0Ml \ No newline at end of file diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml new file mode 100644 index 0000000..bc093b4 --- /dev/null +++ b/.woodpecker/release.yaml @@ -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: + forge_token: + from_secret: GITEA_TOKEN + +when: + event: push + branch: ${CI_REPO_DEFAULT_BRANCH} \ No newline at end of file