mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2024-11-14 18:27:36 +01:00
56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
image: docker:stable
|
|
|
|
variables:
|
|
DOCKER_TLS_CERTDIR: "/certs"
|
|
|
|
services:
|
|
- docker:19.03.8-dind
|
|
|
|
before_script:
|
|
- docker info
|
|
|
|
stages:
|
|
- build
|
|
- upload-release
|
|
|
|
build-master:
|
|
stage: build
|
|
before_script:
|
|
- apk update && apk add make > /dev/null
|
|
script:
|
|
- make build-docker
|
|
- mv build/docker/bemanitools.zip bemanitools.zip
|
|
artifacts:
|
|
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
|
paths:
|
|
- bemanitools.zip
|
|
only:
|
|
refs:
|
|
- master
|
|
|
|
build-tags:
|
|
stage: build
|
|
before_script:
|
|
- apk update && apk add make > /dev/null
|
|
script:
|
|
- make build-docker
|
|
- mv build/docker/bemanitools.zip bemanitools.zip
|
|
artifacts:
|
|
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
|
paths:
|
|
- bemanitools.zip
|
|
only:
|
|
- tags
|
|
|
|
upload-release:
|
|
stage: upload-release
|
|
dependencies:
|
|
- build-tags
|
|
before_script:
|
|
- apk update && apk add curl > /dev/null
|
|
script:
|
|
- echo "Uploading ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}..."
|
|
- curl --silent --show-error -F "key=${CI_UPLOAD_KEY}" -F "filename=${CI_PROJECT_NAME}-v${CI_COMMIT_TAG}.zip" -F "file=@./bemanitools.zip" ${CI_UPLOAD_URL}
|
|
only:
|
|
- tags
|