v1.2.0: script: add a gitlab-ci script
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
e5c0ed2348
commit
faa767ee08
3 changed files with 120 additions and 0 deletions
58
config-ci/.gitlab-ci.yml.j2
Normal file
58
config-ci/.gitlab-ci.yml.j2
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
default:
|
||||
image: debian:11
|
||||
|
||||
stages:
|
||||
- build
|
||||
- publish
|
||||
- release
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: golang:1.21-alpine
|
||||
before_script:
|
||||
- apk update && apk add --no-cache make git
|
||||
script:
|
||||
- make build_password
|
||||
artifacts:
|
||||
paths:
|
||||
- ./bin/*
|
||||
|
||||
publish_main:
|
||||
stage: publish
|
||||
image: golang:1.21-alpine
|
||||
variables:
|
||||
VER: latest
|
||||
before_script:
|
||||
- apk update && apk add --no-cache make git curl
|
||||
script:
|
||||
- make publish_password
|
||||
needs:
|
||||
- build
|
||||
only:
|
||||
- main
|
||||
|
||||
release_tag:
|
||||
stage: publish
|
||||
image: golang:1.21-alpine
|
||||
variables:
|
||||
VER: ${CI_COMMIT_TAG}
|
||||
before_script:
|
||||
- apk update && apk add --no-cache make git curl
|
||||
script:
|
||||
- make publish_password
|
||||
needs:
|
||||
- build
|
||||
only:
|
||||
- tags
|
||||
|
||||
release_job:
|
||||
stage: release
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
before_script:
|
||||
- apk update && apk add --no-cache bash curl
|
||||
script:
|
||||
- bash ./scripts/gitlab_release.sh -r ./docs/release/$CI_COMMIT_TAG* -a ./bin/
|
||||
needs:
|
||||
- build
|
||||
Loading…
Add table
Add a link
Reference in a new issue