-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
123 lines (116 loc) · 2.19 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
image: debian:stable-slim
stages:
- install
- test
- build
- pack
- release
install:
image: node:17.5.0
stage: install
script:
- npm ci
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
test:
image: node:16.4.1
stage: test
script:
- npm run test:pipeline
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
policy: pull
needs:
- install
artifacts:
when: always
paths:
- junit.xml
reports:
junit: junit.xml
build:
image: node:17.5.0
stage: build
script:
- npm run build:production
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
policy: pull
needs:
- install
artifacts:
paths:
- dist/
pack:
image: debian:stable-slim
stage: pack
before_script:
- apt-get update -y
- apt-get install -y zip
- echo $CI_JOB_ID
- echo PACK_JOB_ID=$CI_JOB_ID >> pack.env
script:
- cd dist
- zip -r weather-control.zip *
- mv weather-control.zip ../weather-control.zip
artifacts:
name: weather-control
when: on_success
expire_in: never
paths:
- weather-control.zip
reports:
dotenv: pack.env
dependencies:
- build
needs:
- build
when: on_success
only:
- tags
pack-mr:
image: debian:stable-slim
stage: pack
script:
- apt-get update -y
- apt-get install -y zip
- cd dist
- zip -r weather-control.zip *
- mv weather-control.zip ../weather-control.zip
artifacts:
name: weather-control
when: on_success
expire_in: never
paths:
- weather-control.zip
needs:
- build
when: manual
only:
- branches
create-release:
image: registry.gitlab.com/gitlab-org/release-cli:latest
stage: release
only:
- tags
needs:
- job: pack
artifacts: true
script:
- echo 'running release_job'
- echo 'Previous Job ID is printed below'
- echo $PACK_JOB_ID
release:
tag_name: '$CI_COMMIT_TAG'
description: 'Changelog TBD'
assets:
links:
- name: 'Module Download'
url: 'https://gitlab.com/jstebenne/foundryvtt-weather-control/-/jobs/${PACK_JOB_ID}/artifacts/raw/weather-control.zip'
link_type: other