gitlab ci

This commit is contained in:
Oscar Krause
2025-04-11 19:04:08 +02:00
parent 7b00eb4a97
commit d0dff9ed2c

View File

@@ -1,9 +1,43 @@
build: build:
image: gcc:14.2-bookworm image: gcc:14.2-bookworm # ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}
before_script: before_script:
- apt-get update; apt-get install cmake -y -qq - apt-get update -qq
- apt-get install cmake -y -qq
script: script:
- cmake . - cmake .
- make - make
artifacts: artifacts:
untracked: true untracked: true
deploy:
image: gcc:14.2-bookworm # ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}
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 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: 'asset1'
url: 'https://example.com/assets/1'