Files
gridd-unlock-patcher/.gitlab-ci.yml
2025-06-16 14:39:01 +02:00

54 lines
1.6 KiB
YAML

cache:
key: one-key-to-rule-them-all
paths: [ src/build/_deps ]
build:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/gcc:14.2-bookworm
rules:
- if: $CI_COMMIT_BRANCH
changes: [ src/**/* ]
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG
before_script:
- apt-get update -qq
- apt-get install cmake -y -qq
- cd src
script:
- cmake -DCMAKE_BUILD_TYPE=Release -B build
- make -j$(nproc) -C build
artifacts:
paths: [ src/build/gridd-unlock-patcher ]
deploy:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/gcc:14.2-bookworm
needs:
- job: build
artifacts: true
rules:
- if: $CI_COMMIT_TAG
before_script:
- apt-get update -qq
- apt-get install curl -y -qq
script:
- 'curl --location --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file src/build/gridd-unlock-patcher "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gridd-unlock-patcher/${CI_COMMIT_TAG}/gridd-unlock-patcher"'
release:
image: registry.gitlab.com/gitlab-org/release-cli:latest
stage: .post
needs:
- job: deploy
artifacts: false
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Running release-job for $CI_COMMIT_TAG"
release:
name: $CI_PROJECT_TITLE $CI_COMMIT_TAG
description: Release of $CI_PROJECT_TITLE version $CI_COMMIT_TAG
tag_name: $CI_COMMIT_TAG
ref: $CI_COMMIT_SHA
assets:
links:
- name: "gridd-unlock-patcher"
url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gridd-unlock-patcher/${CI_COMMIT_TAG}/gridd-unlock-patcher"