update
This commit is contained in:
parent
2946cee5c8
commit
49c53e385f
4 changed files with 27 additions and 42 deletions
9
.woodpecker/build.yaml
Normal file
9
.woodpecker/build.yaml
Normal 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
|
|
@ -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
|
6
.woodpecker/discord-noti.yaml
Normal file
6
.woodpecker/discord-noti.yaml
Normal 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
12
.woodpecker/release.yaml
Normal 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}
|
Loading…
Add table
Reference in a new issue