Skip to content

Commit 5c7b514

Browse files
committed
Merge remote-tracking branch 'origin/main' into refactor/isolate-model
2 parents 8d1ac16 + a28829d commit 5c7b514

File tree

22 files changed

+614
-356
lines changed

22 files changed

+614
-356
lines changed

.github/workflows/release-drafter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ permissions:
1111

1212
jobs:
1313
update-release-draft:
14+
concurrency:
15+
group: release-drafter
1416
permissions:
1517
contents: write
1618
pull-requests: read

.github/workflows/release.yml

Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,46 @@
1-
name: Pre-release main branch
1+
name: Release
22

33
on:
4-
release:
5-
types: [published]
6-
4+
workflow_dispatch:
5+
76
permissions:
87
contents: read
98
packages: write
9+
10+
concurrency:
11+
group: release-drafter
1012

1113
jobs:
14+
15+
release-drafter:
16+
outputs:
17+
tag_name: ${{ steps.release-drafter.outputs.tag_name }}
18+
permissions:
19+
contents: write
20+
pull-requests: read
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Verify branch
24+
run: |
25+
if [[ "${{ github.ref }}" != refs/heads/main ]]; then
26+
echo "This workflow is only allowed to run on the main branch."
27+
exit 1
28+
fi
29+
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
30+
id: release-drafter
31+
env:
32+
GITHUB_TOKEN: ${{ github.token }}
33+
- name: Create tag
34+
uses: actions/github-script@v7
35+
with:
36+
script: |
37+
github.rest.git.createRef({
38+
owner: context.repo.owner,
39+
repo: context.repo.repo,
40+
ref: 'refs/tags/${{ steps.release-drafter.outputs.tag_name }}',
41+
sha: context.sha
42+
})
43+
1244
containers:
1345
runs-on: ubuntu-latest
1446
outputs:
@@ -17,7 +49,8 @@ jobs:
1749

1850
steps:
1951
- uses: actions/checkout@v4
20-
52+
with:
53+
ref: ${{ steps.release-drafter.outputs.tag_name }}
2154
- name: Bootstrap Action Workspace
2255
id: bootstrap
2356
uses: ./.github/actions/bootstrap
@@ -29,16 +62,19 @@ jobs:
2962
username: ${{ github.actor }}
3063
password: ${{ secrets.GITHUB_TOKEN }}
3164

32-
3365
- name: Publish Containers
3466
run: ./build.sh publishcontainers
3567

3668
release-lambda:
3769
runs-on: ubuntu-latest
70+
needs:
71+
- release-drafter
3872
permissions:
3973
contents: write
4074
steps:
4175
- uses: actions/checkout@v4
76+
with:
77+
ref: ${{ steps.release-drafter.outputs.tag_name }}
4278
- name: Amazon Linux 2023 build
4379
run: |
4480
docker build . -t publish-links-index:latest -f src/infra/docs-lambda-index-publisher/lambda.DockerFile
@@ -50,11 +86,13 @@ jobs:
5086
- name: Attach Distribution to release
5187
env:
5288
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
run: gh release upload ${{ github.event.release.tag_name }} .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
89+
run: gh release upload ${{ needs.release-drafter.outputs.tag_name }} .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
5490
shell: bash
5591

5692
release:
57-
needs: [containers]
93+
needs:
94+
- containers
95+
- release-drafter
5896
strategy:
5997
fail-fast: false
6098
matrix:
@@ -70,6 +108,8 @@ jobs:
70108

71109
steps:
72110
- uses: actions/checkout@v4
111+
with:
112+
ref: ${{ steps.release-drafter.outputs.tag_name }}
73113

74114
- name: Bootstrap Action Workspace
75115
id: bootstrap
@@ -90,6 +130,20 @@ jobs:
90130
env:
91131
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92132
run: |
93-
gh release upload ${{ github.event.release.tag_name }} .artifacts/publish/docs-builder/release/*.zip
94-
gh release upload ${{ github.event.release.tag_name }} .artifacts/publish/docs-assembler/release/*.zip
133+
gh release upload ${{ needs.release-drafter.outputs.tag_name }} .artifacts/publish/docs-builder/release/*.zip
134+
gh release upload ${{ needs.release-drafter.outputs.tag_name }} .artifacts/publish/docs-assembler/release/*.zip
95135
shell: bash
136+
137+
publish-release:
138+
needs:
139+
- release
140+
- release-lambda
141+
- release-drafter
142+
runs-on: ubuntu-latest
143+
steps:
144+
- name: Publish release
145+
env:
146+
GH_TOKEN: ${{ github.token }}
147+
TAG_NAME: ${{ needs.release-drafter.outputs.tag_name }}
148+
run: |
149+
gh release edit ${{ needs.release-drafter.outputs.tag_name }} --draft=false --latest --repo ${{ github.repository }}

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,10 @@
2828
<ItemGroup>
2929
<Using Include="System.Threading.CancellationToken" Alias="Cancel" />
3030
</ItemGroup>
31+
<!-- MinVer Configuration -->
32+
<PropertyGroup>
33+
<MinVerDefaultPreReleaseIdentifiers>canary.0</MinVerDefaultPreReleaseIdentifiers>
34+
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
35+
</PropertyGroup>
3136

3237
</Project>

Directory.Packages.props

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
55
</PropertyGroup>
66
<ItemGroup>
7-
<GlobalPackageVersion Include="MinVer" Version="6.0.0" PrivateAssets="All" />
7+
<GlobalPackageReference Include="MinVer" Version="6.0.0" PrivateAssets="All" />
88
</ItemGroup>
99
<!-- AWS -->
1010
<ItemGroup>
1111
<PackageVersion Include="Amazon.Lambda.RuntimeSupport" Version="1.13.0" />
1212
<PackageVersion Include="Amazon.Lambda.Core" Version="2.5.1" />
13+
<PackageVersion Include="Amazon.Lambda.S3Events" Version="3.1.0" />
1314
<PackageVersion Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.4.4" />
14-
<PackageVersion Include="AWSSDK.S3" Version="3.7.416.9" />
15-
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.4" />
15+
<PackageVersion Include="Amazon.Lambda.SQSEvents" Version="2.2.0" />
16+
<PackageVersion Include="AWSSDK.SQS" Version="3.7.400.135" />
17+
<PackageVersion Include="AWSSDK.S3" Version="3.7.416.16"/>
1618
</ItemGroup>
1719
<!-- Build -->
1820
<ItemGroup>
@@ -28,18 +30,19 @@
2830
<PackageVersion Include="ConsoleAppFramework.Abstractions" Version="5.4.1" />
2931
<PackageVersion Include="Crayon" Version="2.0.69" />
3032
<PackageVersion Include="DotNet.Glob" Version="3.1.3" />
31-
<PackageVersion Include="Errata" Version="0.13.0" />
32-
<PackageVersion Include="Github.Actions.Core" Version="9.0.0" />
33-
<PackageVersion Include="Markdig" Version="0.40.0" />
33+
<PackageVersion Include="Errata" Version="0.14.0" />
34+
<PackageVersion Include="Github.Actions.Core" Version="9.0.0"/>
3435
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.4" />
3536
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.4" />
37+
<PackageVersion Include="Markdig" Version="0.41.1" />
3638
<PackageVersion Include="NetEscapades.EnumGenerators" Version="1.0.0-beta12" PrivateAssets="all" ExcludeAssets="runtime" />
3739
<PackageVersion Include="Proc" Version="0.9.1" />
3840
<PackageVersion Include="RazorSlices" Version="0.8.1" />
3941
<PackageVersion Include="Samboy063.Tomlet" Version="6.0.0" />
4042
<PackageVersion Include="Slugify.Core" Version="4.0.1" />
4143
<PackageVersion Include="SoftCircuits.IniFileParser" Version="2.7.0" />
4244
<PackageVersion Include="System.IO.Abstractions" Version="21.0.29" />
45+
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.4" />
4346
<PackageVersion Include="Utf8StreamReader" Version="1.3.2" />
4447
<PackageVersion Include="Vecc.YamlDotNet.Analyzers.StaticGenerator" Version="16.1.3" PrivateAssets="All" />
4548
<PackageVersion Include="Westwind.AspNetCore.LiveReload" Version="0.5.2" />

Elastic.Documentation/Links/LinkIndex.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ public record LinkIndexEntry
3939
// TODO can be made required after all doc_sets have published again
4040
[JsonPropertyName("ref")]
4141
public string GitReference { get; init; } = "unknown";
42+
43+
// TODO can be made required after all doc_sets have published again
44+
[JsonPropertyName("updated_at")]
45+
public DateTime UpdatedAt { get; init; } = DateTime.MinValue;
4246
}
4347

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ See the [release-drafter configuration](./.github/release-drafter.yml) for more
173173

174174
## Creating a New Release
175175

176+
To create a new release trigger the [release](https://github.com/elastic/docs-builder/actions/workflows/release.yml) workflow on the `main` branch.
177+
176178
Every time a pull request is merged into the `main` branch, release-drafter will
177179
create a draft release or update the existing draft release in the [Releases](https://github.com/elastic/docs-builder/releases) page.
178180

docs-builder.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{94AC66E5-3
1212
build.sh = build.sh
1313
dotnet-tools.json = dotnet-tools.json
1414
global.json = global.json
15+
Directory.Packages.props = Directory.Packages.props
1516
EndProjectSection
1617
EndProject
1718
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BE6011CC-1200-4957-B01F-FCCA10C5CF5A}"

docs/syntax/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
Elastic Docs V3 uses [Markdown](https://commonmark.org) as its main content authoring format.
44

5-
:::{admonition} New to Markdown?
6-
[Learn Markdown in just 10 minutes](https://commonmark.org/help/).
5+
:::{admonition} New to Elastic Docs V3?
6+
* Learn [Markdown](https://commonmark.org/help/) in 10 minutes
7+
* Review the V3 [](quick-ref.md)
78
:::
89

910
V3 fully supports [CommonMark](https://commonmark.org/), a strongly defined, standard-compliant Markdown specification. In many cases, plain Markdown syntax will be sufficient when authoring Elastic content. On top of this functionality, there are two main syntax extension points:

0 commit comments

Comments
 (0)