Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/workflows/create_docs_version_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/CrestApps.Core.Docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/CrestApps.Core.Docs/docs/changelog/1.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading