Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ npm-types:generate-graphql:
- tmp/schema.graphql
- tmp/schema.json
- tooling/graphql/types/
- VERSION


.npm-types:publish-graphql:
Expand All @@ -155,7 +156,12 @@ npm-types:generate-graphql:
- cd tooling/graphql/types
- npm ci
- npm run generate
- npm version --git-tag-version false 0.0.0-$CI_COMMIT_SHA
- |
if [[ -n "$CI_COMMIT_TAG" ]]; then
npm version --git-tag-version false $CI_COMMIT_TAG
else
npm version --git-tag-version false $(cat ../../../VERSION)-experimental-$CI_PIPELINE_ID-$CI_COMMIT_SHA
fi

npm-types:publish-graphql-dry-run:
extends:
Expand All @@ -169,6 +175,8 @@ npm-types:publish-graphql-dry-run:
paths:
- tooling/graphql/types/index.d.ts
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $C0_GH_REF_NAME != "main"

npm-types:publish-graphql:
Expand All @@ -177,8 +185,14 @@ npm-types:publish-graphql:
stage: publish
script:
- !reference [ .npm-types:publish-graphql, script ]
- npm publish --tag latest
- |
if [[ -n "$CI_COMMIT_TAG" ]]; then
npm publish --tag latest
else
npm publish --tag experimental
fi
rules:
- if: $CI_COMMIT_TAG
- if: $C0_GH_REF_NAME == "main"
when: manual
allow_failure: true