-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
63 lines (60 loc) · 2.2 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
stages:
- build
- release
build:
stage: build
image: ubuntu:latest
before_script:
- echo $CI_JOB_ID
- echo BUILD_JOB_ID=$CI_JOB_ID >> build.env
- cat VERSION >> build.env
script:
- ./mkpkg
only:
- tags
artifacts:
paths:
- dist/*.deb
- dist/*.rpm
- dist/*.tgz
- dist/*.zip
reports:
dotenv: build.env
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- echo 'running release_job'
- echo 'Previous Job ID:'
- echo $BUILD_JOB_ID
- echo 'VERSION:'
- echo $VERSION
- echo 'RELEASE:'
- echo $RELEASE
needs:
- job: build
artifacts: true
release:
name: 'MirrorCommand Version $VERSION release $RELEASE'
description: './pkg/release.md'
tag_name: 'v${VERSION}r${RELEASE}'
assets:
links:
- name: 'MirrorCommand_${VERSION}-${RELEASE}.deb - Debian format installation package (Ubuntu Linux, etc)'
url: 'https://gitlab.com/doctorfree/MirrorCommand/-/jobs/${BUILD_JOB_ID}/artifacts/file/dist/MirrorCommand_${VERSION}-${RELEASE}.deb'
link_type: 'package'
- name: 'MirrorCommand_${VERSION}-${RELEASE}.rpm - RPM format installation package (CentOS/Fedora Linux etc)'
url: 'https://gitlab.com/doctorfree/MirrorCommand/-/jobs/${BUILD_JOB_ID}/artifacts/file/dist/MirrorCommand_${VERSION}-${RELEASE}.rpm'
link_type: 'package'
- name: 'MirrorCommand_${VERSION}-${RELEASE}.tgz - Compressed tar format distribution archive'
url: 'https://gitlab.com/doctorfree/MirrorCommand/-/jobs/${BUILD_JOB_ID}/artifacts/file/dist/MirrorCommand_${VERSION}-${RELEASE}.tgz'
link_type: 'other'
- name: 'MirrorCommand_${VERSION}-${RELEASE}.zip - Zip format distribution archive'
url: 'https://gitlab.com/doctorfree/MirrorCommand/-/jobs/${BUILD_JOB_ID}/artifacts/file/dist/MirrorCommand_${VERSION}-${RELEASE}.zip'
link_type: 'other'
only:
- tags