diff --git a/.github/workflows/create_docs_version_pr.yml b/.github/workflows/create_docs_version_pr.yml index 384f4453..fe8cb028 100644 --- a/.github/workflows/create_docs_version_pr.yml +++ b/.github/workflows/create_docs_version_pr.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: inputs: release: - description: 'Release tag or docs version to snapshot (for example v1.1.0, 1.1.2, 1.1.0, or 1.1). Prerelease values are skipped.' + description: 'Release tag or docs version to snapshot (for example v1.1.0, 1.1.2, 1.1.0, v1.1, or 1.1). Prerelease values are skipped.' required: true type: string @@ -45,12 +45,12 @@ jobs: DOC_VERSION="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}" SOURCE_REF="refs/tags/v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}" SHOULD_EVALUATE=true - elif [[ "${RELEASE}" =~ ^([0-9]+)\.([0-9]+)$ ]]; then + elif [[ "${RELEASE}" =~ ^v?([0-9]+)\.([0-9]+)$ ]]; then DOC_VERSION="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}" SOURCE_REF="refs/tags/v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.0" SHOULD_EVALUATE=true else - SKIP_REASON="Skipping docs version PR for unsupported release input '${RELEASE}'. Use vX.Y.Z, X.Y.0, or X.Y." + SKIP_REASON="Skipping docs version PR for unsupported release input '${RELEASE}'. Use vX.Y.Z, X.Y.0, vX.Y, or X.Y." fi if [[ "${SHOULD_EVALUATE}" == "true" ]]; then diff --git a/src/CrestApps.Core.Docs/README.md b/src/CrestApps.Core.Docs/README.md index 531b238f..ef9ae54a 100644 --- a/src/CrestApps.Core.Docs/README.md +++ b/src/CrestApps.Core.Docs/README.md @@ -33,7 +33,7 @@ that snapshots the current docs as `X.Y` (for example, `v1.0.0` produces the `1. version, served under `/docs/1.0/`). Patch tags create the `X.Y` docs version only when that version does not already exist; otherwise they are logged and skipped successfully. Prerelease tags are also skipped successfully. The workflow can be -run manually with a `vX.Y.Z`, `X.Y.0`, or `X.Y` input; two-part `X.Y` inputs +run manually with a `vX.Y.Z`, `X.Y.0`, `vX.Y`, or `X.Y` input; two-part inputs snapshot the matching `vX.Y.0` tag. If branch protection requires PR checks, configure a `DOCS_VERSION_PR_TOKEN` repository secret backed by a GitHub App token or fine-grained personal access token with contents and pull-request write access diff --git a/src/CrestApps.Core.Docs/docs/changelog/1.3.0.md b/src/CrestApps.Core.Docs/docs/changelog/1.3.0.md index b2cf2674..b495ee5d 100644 --- a/src/CrestApps.Core.Docs/docs/changelog/1.3.0.md +++ b/src/CrestApps.Core.Docs/docs/changelog/1.3.0.md @@ -23,7 +23,7 @@ and preview builds are published from `main` under the `1.3.0` version prefix. - changes release documentation versioning so stable `vX.Y.Z` tag pushes create a pull request with the generated Docusaurus version files instead of generating versioned docs inside the Pages deployment artifact; the workflow also supports - manual runs for `vX.Y.Z`, `X.Y.0`, or `X.Y` inputs, creates the `X.Y` docs version - from patch tags only when that major/minor docs version does not already exist, - and skips prerelease tags successfully after logging why no docs version PR was - needed + manual runs for `vX.Y.Z`, `X.Y.0`, `vX.Y`, or `X.Y` inputs, creates the `X.Y` + docs version from patch tags only when that major/minor docs version does not + already exist, and skips prerelease tags successfully after logging why no docs + version PR was needed