This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (43 loc) · 1.55 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
stages:
- build
- release
.release:
only:
- /^[0-9]+?\.[0-9]+?\.[0-9]+?$/i
variables:
NAME: tivoli-blender-tools
build:
stage: build
image: python:alpine
extends: .release
script:
- apk add coreutils zip
# update version
- export VERSION_CSV=$(echo $CI_COMMIT_TAG | sed "s/\./, /g")
- sed -i "s/(0, 0, 0)/($VERSION_CSV)/" __init__.py
- mkdir $NAME
- ls | grep -v $NAME | xargs mv -t $NAME
# TODO move download libs to addon itself so artifacts are tiny
- python $NAME/download_libs.py nt
- zip -r $NAME-$CI_COMMIT_TAG-windows.zip $NAME
- rm -rf $NAME/libs
- python $NAME/download_libs.py posix
- zip -r $NAME-$CI_COMMIT_TAG-linux.zip $NAME
- rm -rf $NAME/libs
artifacts:
expire_in: 99999 years
paths:
- $NAME-$CI_COMMIT_TAG-windows.zip
- $NAME-$CI_COMMIT_TAG-linux.zip
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
extends: .release
script:
- release-cli create
--name "Tivoli Blender Tools $CI_COMMIT_TAG"
--description ""
--assets-links-name "$NAME-$CI_COMMIT_TAG-windows.zip"
--assets-links-url "$CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_SHORT_SHA/raw/$NAME-$CI_COMMIT_TAG-windows.zip?job=build"
--assets-links-name "$NAME-$CI_COMMIT_TAG-linux.zip"
--assets-links-url "$CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_SHORT_SHA/raw/$NAME-$CI_COMMIT_TAG-linux.zip?job=build"