1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2024-11-24 14:50:10 +01:00
bemanitools/.gitlab-ci.yml

74 lines
1.7 KiB
YAML

image: debian
stages:
- build
- test
- release
- releasetag
build:
stage: build
before_script:
- apt-get update && apt-get -qq install clang mingw-w64 git make zip > /dev/null
script:
- make
artifacts:
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
paths:
- build
only:
refs:
- master
test:
allow_failure: true
stage: test
dependencies:
- build
before_script:
- apt-get update && apt-get -qq install make wine unzip > /dev/null
- dpkg --add-architecture i386 && apt-get update && apt-get -qq install wine32 > /dev/null
script:
- ls
- make run-tests
only:
refs:
- master
release:
stage: release
variables:
GIT_STRATEGY: none
dependencies:
- build
before_script:
- apt-get update && apt-get -qq install zip > /dev/null
script:
- mv build/bemanitools.zip ./bemanitools.zip
- find . -mindepth 1 ! -regex '^./bemanitools.zip' -delete
- unzip bemanitools.zip
- rm bemanitools.zip
artifacts:
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
paths:
- ./*
only:
refs:
- master
releasetag:
stage: releasetag
dependencies: []
before_script:
- apt-get update && apt-get -qq install curl > /dev/null
script:
- |
curl --silent --show-error \
--data "{\"tag_name\": \"${CI_COMMIT_TAG}\", \"name\": \"${CI_PROJECT_NAME}-${CI_COMMIT_TAG}\", \"description\": \"${CI_COMMIT_TAG_MESSAGE:-No release notes.}\"}" \
--header "Content-Type: application/json" \
--header "Private-Token: ${CI_PRIVATE_TOKEN}" \
--request POST \
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases"
only:
- tags