-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
54 lines (49 loc) · 1.45 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
# define also stages which are used in includes
default:
image: python:alpine
stages:
- analysis
- build
- docs
- test
- pack
- release
include:
- local: "docs/.gitlab-ci.yml"
- local: "frontend/.gitlab-ci.yml"
- local: "backend/.gitlab-ci.yml"
pack:
before_script:
- apk add --update zip
- echo pack
stage: pack
script:
- ls
- python3 scripts/pack.py
- zip -qr roseguarden.zip ./roseguarden
artifacts:
name: "roseguarden-snapshot-$CI_COMMIT_TIMESTAMP-$CI_COMMIT_SHORT_SHA"
paths:
- roseguarden
only:
refs:
- tags
- master
except:
changes:
- "README.md"
release:
stage: release
before_script:
- apk add --update curl && rm -rf /var/cache/apk/*
- apk add --update zip
image: registry.gitlab.com/gitlab-org/release-cli:latest
only:
refs:
- tags
script:
- zip -r roseguarden.zip ./roseguarden
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file roseguarden.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/roseguarden-${CI_COMMIT_TAG}/$CI_COMMIT_TAG/roseguarden-${CI_COMMIT_TAG}-${CI_COMMIT_SHORT_SHA}.zip"'
- |
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"roseguarden-$CI_COMMIT_TAG\",\"url\":\"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/roseguarden-${CI_COMMIT_TAG}/$CI_COMMIT_TAG/roseguarden-${CI_COMMIT_TAG}-${CI_COMMIT_SHORT_SHA}.zip\"}"