-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
97 lines (91 loc) · 3.02 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
image: node:latest
stages:
- assembly
- publish # Unfortunately yarn/npm version won't let us push uncommitted changes
# Compile the golang project in /devops folder.
FetchCritstrike:
image: golang:latest
stage: assembly
script:
# Make the output folders
- mkdir -p bin/{linux,macos,win64}
# UPDATE: The binaries now have to be copied from approriate repo
- wget -P ./bin/linux https://github.com/suvam0451/critstrike-cli/releases/latest/download/critstrike
- wget -P ./bin/macos https://github.com/suvam0451/critstrike-cli/releases/latest/download/critstrike_mac
- wget -P ./bin/win64 https://github.com/suvam0451/critstrike-cli/releases/latest/download/critstrike.exe
artifacts:
paths:
- ./bin
DefaultPackage:
stage: publish
script:
# Comment out to use github packages
- yarn config set '//npm.pkg.github.com/:_authToken' "${GITHUB_AUTH_TOKEN}"
- npm config set '//npm.pkg.github.com/:_authToken' "${GITHUB_AUTH_TOKEN}" # This alone will allow access
- yarn login --registry=https://npm.pkg.github.com
# Comment out to use gitlab packages
# - npm config set '//gitlab.com/api/v4/packages/npm/:_authToken' "${GITLAB_AUTH_TOKEN}
# - yarn config set '//gitlab.com/api/v4/packages/npm/:_authToken' "${GITLAB_AUTH_TOKEN}
# - yarn login --registry=https://gitlab.com/api/v4/packages/npm
- yarn install
- yarn run webpack
- yarn vsce package
dependencies:
- FetchCritstrike
artifacts:
paths:
- ./*.vsix
# patch updates
Shipping_Patch:
stage: publish
script:
- yarn config set '//npm.pkg.github.com/:_authToken' "${GITHUB_AUTH_TOKEN}"
- npm config set '//npm.pkg.github.com/:_authToken' "${GITHUB_AUTH_TOKEN}"
- yarn login --registry=https://npm.pkg.github.com
- yarn install
- yarn run webpack
- yarn vsce publish patch -p ${VSCODE_AUTH_TOKEN} --yarn
dependencies:
- FetchCritstrike
only:
variables:
- $CI_COMMIT_MESSAGE =~ /-patch/
artifacts:
paths:
- ./*.vsix
# minor version increments
Shipping_Minor:
stage: publish
script:
- yarn config set '//npm.pkg.github.com/:_authToken' "${GITHUB_AUTH_TOKEN}"
- npm config set '//npm.pkg.github.com/:_authToken' "${GITHUB_AUTH_TOKEN}"
- yarn login --registry=https://npm.pkg.github.com
- yarn install
- yarn run webpack
- yarn vsce publish minor -p ${VSCODE_AUTH_TOKEN} --yarn
dependencies:
- FetchCritstrike
only:
variables:
- $CI_COMMIT_MESSAGE =~ /-minor/
artifacts:
paths:
- ./*.vsix
# major version increments
Shipping_Major:
stage: publish
script:
- yarn config set '//npm.pkg.github.com/:_authToken' "${GITHUB_AUTH_TOKEN}"
- npm config set '//npm.pkg.github.com/:_authToken' "${GITHUB_AUTH_TOKEN}"
- yarn login --registry=https://npm.pkg.github.com
- yarn install
- yarn run webpack
- yarn vsce publish major -p ${VSCODE_AUTH_TOKEN} --yarn
dependencies:
- FetchCritstrike
only:
variables:
- $CI_COMMIT_MESSAGE =~ /-major/
artifacts:
paths:
- ./*.vsix