-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
43 lines (42 loc) · 1.59 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
image: node:latest
# A job called "release".
release:
# Run at "build" stage.
stage: build
script:
# Download `frontend-lib` source codes.
# Using a "git" url results in an SSH error:
# https://gitlab.com/gitlab-org/gitlab-runner/-/issues/3679
# - git clone [email protected]:catamphetamine/frontend-lib.git
- git clone https://gitlab.com/catamphetamine/frontend-lib.git
- cd frontend-lib
- yarn link
- cd ..
- git clone https://gitlab.com/catamphetamine/social-components-react.git
- cd social-components-react
- yarn link
- cd ..
# Correct the paths to `frontend-lib`.
# - find ./src/styles/ -type f -exec sed --in-place 's+../frontend-lib+frontend-lib+g' {} \;
# - sed --in-place 's+../frontend-lib+frontend-lib+' webpack/webpack.config.js
# - sed --in-place 's+../frontend-lib+./frontend-lib+' babel.config.js
# - sed --in-place 's+../frontend-lib+./frontend-lib+' .postcssrc.json
# - sed --in-place 's+../frontend-lib+./frontend-lib+' frontend-lib/babel.config.js
# Install the dependencies.
- yarn
- yarn link frontend-lib
- yarn link social-components-react
# Build the project into the `/build` folder.
- yarn run build
# Zip the contents of the `/build` folder into a `*.zip` file.
- yarn run build:pack
# Describe the build file to upload after the job finishes.
artifacts:
paths:
# The build file will be called "anychan-<version>.zip".
- anychan-*.zip
# Don't delete the build file.
expire_in: never
# Only run this job when creating a git tag (a release tag).
only:
- tags