-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
42 lines (40 loc) · 1.14 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
.react_auth_base:
image: node:20.18.1@sha256:f99a6bd6fb137cfc683e1ff60e7d67aa8d5fcf45a6a64c01c37b4f433a6238b6
before_script:
- apt-get -qq update
- apt-get install -y jq
- corepack enable
- cd packages/react-auth
- yarn install --immutable
cache:
- key:
files:
- packages/react-auth/yarn.lock
paths:
- packages/react-auth/node_modules
publish_react_auth:
extends: .react_auth_base
stage: publish
script:
- cp ../../scripts/publish.sh .
- echo "${NPMRC}" > .npmrc && ./publish.sh && rm .npmrc
- rm publish.sh
rules:
- if: $CI_COMMIT_BRANCH == "main"
changes:
- packages/react-auth/**/*
when: always
tag_react_auth:
extends: .react_auth_base
stage: tag_release
script:
- apt install -y python3 python3-github
- VERSION=$(node -p "require('./package.json').version")
- cp ../../scripts/tag_release.py .
- python3 tag_release.py ${GITHUB_TOKEN} ${VERSION} ${CI_COMMIT_SHA} "react-auth" "React Auth"
- rm tag_release.py
rules:
- if: $CI_COMMIT_BRANCH == "main"
changes:
- packages/react-auth/**/*
when: always