diff --git a/.gitlab/openapi-generator-local.gitlab-ci.yml b/.gitlab/openapi-generator-local.gitlab-ci.yml index aaef0b154f4ed4b512e6f76ba62faf2725e8dda8..c25ef3e71e3bf4ca6a5a187b1aa6b44f15f266b7 100644 --- a/.gitlab/openapi-generator-local.gitlab-ci.yml +++ b/.gitlab/openapi-generator-local.gitlab-ci.yml @@ -5,6 +5,11 @@ variables: # the root of our repository which would otherwise signal that. OPENAPI_GENERATOR_ENABLED: "1" + # Override the OpenAPI build artefact locations which are, in turn, added to the release-it + # configuration. We set these here explicitly so that we can curate the naming of the release + # assets. + OPENAPI_GENERATOR_SCHEMA_ARTIFACT_PATH: openapi.yaml + # We do not ship the OpenAPI schema in the repository and so the openapi:schema job needs to be # extended to create the schema. openapi:schema: diff --git a/.gitlab/openapi-generator.gitlab-ci.yml b/.gitlab/openapi-generator.gitlab-ci.yml index 5dc90f7f3fd02f58190c15cbd27d974fc9848d66..42aa39fc8470bb96028b7e362c6a271e1b8e3d2d 100644 --- a/.gitlab/openapi-generator.gitlab-ci.yml +++ b/.gitlab/openapi-generator.gitlab-ci.yml @@ -69,6 +69,8 @@ openapi:schema:version: image: name: $OPENAPI_GENERATOR_YQ_IMAGE entrypoint: [""] + before_script: + - mkdir -p $(dirname "$OPENAPI_GENERATOR_SCHEMA_VERSION_ARTIFACT") script: - yq -r ".info.version" "$OPENAPI_GENERATOR_SCHEMA_ARTIFACT_PATH" >"$OPENAPI_GENERATOR_SCHEMA_VERSION_ARTIFACT" artifacts: diff --git a/.release-it.json b/.release-it.json index b75b801c45c416155340c2859a12613520aea62b..a7e8b63b7d48aab2fd538e825ce26c391674cc71 100644 --- a/.release-it.json +++ b/.release-it.json @@ -4,7 +4,10 @@ }, "gitlab": { "release": true, - "releaseName": "${version}" + "releaseName": "${version}", + "assets": [ + "openapi.yml" + ] }, "plugins": { "@release-it/conventional-changelog": {