-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
79 lines (75 loc) · 2.53 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# 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_deb
- build_rpm
- release
build:
stage: build_deb
image: ubuntu:latest
before_script:
- echo $CI_JOB_ID
- echo BUILD_JOB_ID=$CI_JOB_ID >> build.env
- cat VERSION >> build.env
script:
- ./mkdeb
only:
- tags
artifacts:
paths:
- dist/*.deb
- dist/*.tgz
- dist/*.zip
reports:
dotenv: build.env
stage: build_rpm
image: fedora:latest
before_script:
- echo $CI_JOB_ID
- echo BUILD_JOB_ID=$CI_JOB_ID >> build.env
- cat VERSION >> build.env
script:
- ./mkrpm
only:
- tags
artifacts:
paths:
- dist/*.rpm
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: 'MusicPlayerPlus Version $VERSION release $RELEASE'
description: './pkg/release.md'
tag_name: 'v${VERSION}r${RELEASE}'
assets:
links:
- name: 'MusicPlayerPlus_${VERSION}-${RELEASE}.amd64.deb - Debian format installation package (Ubuntu Linux, etc)'
url: 'https://gitlab.com/doctorfree/MusicPlayerPlus/-/jobs/${BUILD_JOB_ID}/artifacts/file/dist/MusicPlayerPlus_${VERSION}-${RELEASE}.amd64.deb'
link_type: 'package'
- name: 'MusicPlayerPlus_${VERSION}-${RELEASE}.x86_64.rpm - RPM format installation package (CentOS/Fedora Linux etc)'
url: 'https://gitlab.com/doctorfree/MusicPlayerPlus/-/jobs/${BUILD_JOB_ID}/artifacts/file/dist/MusicPlayerPlus_${VERSION}-${RELEASE}.x86_64.rpm'
link_type: 'package'
- name: 'MusicPlayerPlus_${VERSION}-${RELEASE}.tgz - Compressed tar format distribution archive'
url: 'https://gitlab.com/doctorfree/MusicPlayerPlus/-/jobs/${BUILD_JOB_ID}/artifacts/file/dist/MusicPlayerPlus_${VERSION}-${RELEASE}.tgz'
link_type: 'other'
- name: 'MusicPlayerPlus_${VERSION}-${RELEASE}.zip - Zip format distribution archive'
url: 'https://gitlab.com/doctorfree/MusicPlayerPlus/-/jobs/${BUILD_JOB_ID}/artifacts/file/dist/MusicPlayerPlus_${VERSION}-${RELEASE}.zip'
link_type: 'other'
only:
- tags