diff --git a/.github/ISSUE_TEMPLATE/---release.md b/.github/ISSUE_TEMPLATE/---release.md index 96c5f48da5..41099acc36 100644 --- a/.github/ISSUE_TEMPLATE/---release.md +++ b/.github/ISSUE_TEMPLATE/---release.md @@ -29,14 +29,7 @@ If the troubleshooting section does not contain the answer to the problem you en - [ ] Check the [releases][releases] page. The release has to be marked manually as `latest` if this is the case. - [ ] Check the `release/N.M.x` release branch exists. - [ ] Update the official documentation at [https://github.com/Kong/developer.konghq.com/][docs_repo] - - [ ] Run post processing script for `${KUBERNETES_CONFIGURATION_REPO}/docs/gateway-operator-api-reference.md`, providing a tagged version of CRD reference from docs repo as an argument, e.g. `app/_src/gateway-operator/reference/custom-resources/1.2.x.md`. - This will add the necessary skaffolding so that the reference is rendered correctly on docs.konghq.com. - - Example: - - ```sh - ${KUBERNETES_CONFIGURATION_REPO}/scripts/apidocs-gen/post-process-for-konghq.sh ${KUBERNETES_CONFIGURATION_REPO}/docs/gateway-operator-api-reference.md ${KONGHQ_DOCS_REPO}/app/_src/gateway-operator/reference/custom-resources/1.2.x.md - ``` + - **CLI configuration options** and **CRD reference**: Automatically synced by the release workflow. A PR will be created in the docs repo. Review and merge it when ready. ## Conformance tests report diff --git a/.github/workflows/__release-workflow.yaml b/.github/workflows/__release-workflow.yaml index 88d32c8792..4e74f69e82 100644 --- a/.github/workflows/__release-workflow.yaml +++ b/.github/workflows/__release-workflow.yaml @@ -37,7 +37,12 @@ on: default: 'main' required: false latest: - description: Whether to mark this release latest + description: | + Whether to mark this release latest. + Only set to true if this release is the current maximum version. + If a newer major or minor version has been released (e.g., 2.2 is released), + do NOT set this to true when releasing an older branch (e.g., 2.1.1), + otherwise the docs will be overwritten. type: boolean default: false release-type: @@ -362,6 +367,7 @@ jobs: env: DOCS_REPO: developer.konghq.com DOCS_REPO_PATH_CLI_ARGS_DOC: app/operator/reference/configuration-options.md + DOCS_REPO_PATH_CRD_DOC: app/operator/reference/custom-resources.md needs: - semver - create-release-pr @@ -385,6 +391,14 @@ jobs: run: | cp ./docs/cli-arguments-for-developer-konghq-com.md ${{ env.DOCS_REPO }}/${{ env.DOCS_REPO_PATH_CLI_ARGS_DOC }} + - name: update CRD reference docs + run: | + mkdir -p "$(dirname "${{ env.DOCS_REPO }}/${{ env.DOCS_REPO_PATH_CRD_DOC }}")" + ./scripts/apidocs-gen/post-process-for-konghq.sh \ + ./docs/gateway-operator-api-reference.md \ + "${{ env.DOCS_REPO }}/${{ env.DOCS_REPO_PATH_CRD_DOC }}" \ + "${{ env.DOCS_REPO }}" + - name: Detect changes id: detect-changes run: |