-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
39 lines (35 loc) · 895 Bytes
/
.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
stages:
- build
- upload
- release
variables:
WEB_EXT_VERSION: "$CI_COMMIT_TAG"
WEB_EXT_ZIP: "bypass_twitter_login_wall-${WEB_EXT_VERSION}.zip"
build:
stage: build
image: node:16.13.2
script:
- yarn
- yarn build
artifacts:
paths:
- web-ext-artifacts
rules:
- if: $CI_COMMIT_TAG
upload:
stage: upload
image: curlimages/curl:latest
rules:
- if: $CI_COMMIT_TAG
script:
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file web-ext-artifacts/${WEB_EXT_ZIP} "${PACKAGE_REGISTRY_URL}/${WEB_EXT_ZIP}"
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- |
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"${WEB_EXT_ZIP}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WEB_EXT_ZIP}\"}"