Skip to content

Commit 4abd918

Browse files
authored
Merge branch 'main' into font-family-name
2 parents 66ed019 + 860489e commit 4abd918

File tree

238 files changed

+22396
-11881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+22396
-11881
lines changed

.github/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Types of Workflows
2+
==================
3+
4+
* `workflows/build-specs.yml` - builds the entire repository of Editor's Drafts, along with a summary page. Also builds any `.issues` Issues-List files, and Markdown files. Deploys all the results to the repo's gh-pages
5+
6+
* `workflows/SPEC-NAME-1.yml` - each of these auto-publish *one* spec in the repo. Do not modify them by hand; they are auto-generated by [`generate-auto-publish-workflows.py`](https://github.com/w3c/csswg-drafts/blob/main/.github/generate-auto-publish-workflows.py) and [`auto-publish-template.yml`](https://github.com/w3c/csswg-drafts/blob/main/.github/auto-publish-template.yml). Instead, update and run this `.py` file and commit the results.

.github/auto-publish-template.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
######################################################################
2+
# This is the template used to generate auto-publication workflows for
3+
# the different documents in the repository. Check generate script for
4+
# details. Edit this file and run the script again to update the
5+
# workflows.
6+
######################################################################
7+
8+
name: Publish {{shortname}} on /TR
9+
10+
on:
11+
pull_request:
12+
paths:
13+
- "{{shortname}}/**"
14+
push:
15+
branches: [main]
16+
paths:
17+
- "{{shortname}}/**"
18+
workflow_dispatch:
19+
20+
jobs:
21+
publish-TR-{{shortname}}:
22+
name: Publish {{shortname}}
23+
if: github.repository == 'w3c/csswg-drafts'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v6
27+
- uses: w3c/spec-prod@v2
28+
with:
29+
TOOLCHAIN: bikeshed
30+
SOURCE: {{shortname}}/Overview.bs
31+
DESTINATION: {{shortname}}/index.html
32+
BUILD_FAIL_ON: warning
33+
VALIDATE_MARKUP: false
34+
W3C_ECHIDNA_TOKEN: ${{ secrets.{{tokenName}} }}
35+
W3C_WG_DECISION_URL: https://www.w3.org/2025/08/21-css-minutes.html#fc30
36+
W3C_BUILD_OVERRIDE: |
37+
status: {{publicationStatus}}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Script to generate auto publication workflows for given specs
4+
"""
5+
6+
import re
7+
from pathlib import Path
8+
9+
# -----------------------------------------------------------------------------
10+
# List of properties that can appear to describe a spec.
11+
# -----------------------------------------------------------------------------
12+
13+
PROPERTIES = [
14+
"shortname",
15+
"publicationStatus",
16+
"tokenName",
17+
]
18+
19+
# -----------------------------------------------------------------------------
20+
# List of specs for which an auto-publish script needs to be created.
21+
# -----------------------------------------------------------------------------
22+
23+
SPECS = [
24+
{
25+
"shortname": "css-color-4",
26+
"publicationStatus": "CRD",
27+
},
28+
{
29+
"shortname": "css-color-5",
30+
"publicationStatus": "WD",
31+
},
32+
{
33+
"shortname": "css-color-hdr-1",
34+
"publicationStatus": "WD",
35+
},
36+
{
37+
"shortname": "css-fonts-4",
38+
"publicationStatus": "WD",
39+
},
40+
{
41+
"shortname": "css-fonts-5",
42+
"publicationStatus": "WD",
43+
},
44+
{
45+
"shortname": "css-2026",
46+
"publicationStatus": "NOTE",
47+
},
48+
{
49+
"shortname": "css-2027",
50+
"publicationStatus": "NOTE",
51+
},
52+
]
53+
54+
# -----------------------------------------------------------------------------
55+
# Main
56+
# -----------------------------------------------------------------------------
57+
58+
def main():
59+
script_path = Path(__file__).parent
60+
template_path = script_path / "auto-publish-template.yml"
61+
workflows_dir = script_path / "workflows"
62+
63+
workflows_dir.mkdir(parents=True, exist_ok=True)
64+
65+
template = template_path.read_text(encoding="utf-8")
66+
67+
# Replace the large comment header block (#####...#####)
68+
template = re.sub(
69+
r"#{5,}.*?#{5,}",
70+
"""######################################################################
71+
# IMPORTANT: Do not edit this file directly!
72+
#
73+
# This workflow was automatically generated through the
74+
# generate-auto-publish-workflows.py script. To update the workflow,
75+
# make changes to the template file and run the script again.
76+
######################################################################""",
77+
template,
78+
flags=re.S,
79+
)
80+
81+
for spec in SPECS:
82+
spec = spec.copy()
83+
84+
# Derive shortname from source if not provided
85+
if "shortname" not in spec or not spec["shortname"]:
86+
spec["shortname"] = spec["source"].split(".")[0].replace("_", "-")
87+
88+
# Derive tokenName if not provided
89+
if "tokenName" not in spec or not spec["tokenName"]:
90+
token = (
91+
spec["shortname"]
92+
.upper()
93+
.replace("-", "_")
94+
)
95+
spec["tokenName"] = f"TR_TOKEN_{token}"
96+
97+
# Apply template substitutions
98+
content = template
99+
for prop in PROPERTIES:
100+
value = spec.get(prop, "")
101+
content = content.replace(f"{{{{{prop}}}}}", value)
102+
103+
# Write workflow file
104+
filename = workflows_dir / f"{spec['shortname']}.yml"
105+
filename.write_text(content, encoding="utf-8", newline="\n")
106+
print(f"Generated {filename}")
107+
108+
109+
if __name__ == "__main__":
110+
main()

.github/workflows/build-specs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ concurrency:
1717

1818
jobs:
1919
build-specs:
20+
if: github.repository == 'w3c/csswg-drafts'
2021
runs-on: ubuntu-latest
2122

2223
environment:
@@ -33,6 +34,7 @@ jobs:
3334
python-version: "3.14"
3435
cache: 'pip'
3536

37+
- run: sudo apt-get install -y cmark-gfm
3638
- run: pip install bikeshed
3739
- run: bikeshed update
3840

@@ -57,6 +59,14 @@ jobs:
5759
SHORT_DATE="$(date --date=@"$TIMESTAMP" --utc +%F)"
5860
bikeshed -f spec "$file" "${file%Overview.bs}index.html" --md-date="$SHORT_DATE" --md-Text-Macro="BUILTBYGITHUBCI foo"
5961
done
62+
- name: Build issues lists
63+
run: |
64+
for file in ./**/*.bsi ./**/issues-*.txt; do
65+
echo " $file"
66+
bikeshed issues-list "$file" || true
67+
done
68+
- name: Build markdown
69+
run: python ./bin/build-markdown.py
6070
- name: Build index & symlinks
6171
run: python ./bin/build-index.py
6272
- run: rm -rf ./.git{,attributes,ignore}

.github/workflows/css-2026.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
######################################################################
2+
# IMPORTANT: Do not edit this file directly!
3+
#
4+
# This workflow was automatically generated through the
5+
# generate-auto-publish-workflows.py script. To update the workflow,
6+
# make changes to the template file and run the script again.
7+
######################################################################
8+
9+
name: Publish css-2026 on /TR
10+
11+
on:
12+
pull_request:
13+
paths:
14+
- "css-2026/**"
15+
push:
16+
branches: [main]
17+
paths:
18+
- "css-2026/**"
19+
workflow_dispatch:
20+
21+
jobs:
22+
publish-TR-css-2026:
23+
name: Publish css-2026
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v6
27+
- uses: w3c/spec-prod@v2
28+
with:
29+
TOOLCHAIN: bikeshed
30+
SOURCE: css-2026/Overview.bs
31+
DESTINATION: css-2026/index.html
32+
BUILD_FAIL_ON: warning
33+
VALIDATE_MARKUP: false
34+
W3C_ECHIDNA_TOKEN: ${{ secrets.TR_TOKEN_CSS_2026 }}
35+
W3C_WG_DECISION_URL: https://www.w3.org/2025/08/21-css-minutes.html#fc30
36+
W3C_BUILD_OVERRIDE: |
37+
status: NOTE

.github/workflows/css-2027.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
######################################################################
2+
# IMPORTANT: Do not edit this file directly!
3+
#
4+
# This workflow was automatically generated through the
5+
# generate-auto-publish-workflows.py script. To update the workflow,
6+
# make changes to the template file and run the script again.
7+
######################################################################
8+
9+
name: Publish css-2027 on /TR
10+
11+
on:
12+
pull_request:
13+
paths:
14+
- "css-2027/**"
15+
push:
16+
branches: [main]
17+
paths:
18+
- "css-2027/**"
19+
workflow_dispatch:
20+
21+
jobs:
22+
publish-TR-css-2027:
23+
name: Publish css-2027
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v6
27+
- uses: w3c/spec-prod@v2
28+
with:
29+
TOOLCHAIN: bikeshed
30+
SOURCE: css-2027/Overview.bs
31+
DESTINATION: css-2027/index.html
32+
BUILD_FAIL_ON: warning
33+
VALIDATE_MARKUP: false
34+
W3C_ECHIDNA_TOKEN: ${{ secrets.TR_TOKEN_CSS_2027 }}
35+
W3C_WG_DECISION_URL: https://www.w3.org/2025/08/21-css-minutes.html#fc30
36+
W3C_BUILD_OVERRIDE: |
37+
status: NOTE

.github/workflows/css-color-4.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
######################################################################
2+
# IMPORTANT: Do not edit this file directly!
3+
#
4+
# This workflow was automatically generated through the
5+
# generate-auto-publish-workflows.py script. To update the workflow,
6+
# make changes to the template file and run the script again.
7+
######################################################################
8+
9+
name: Publish css-color-4 on /TR
10+
11+
on:
12+
pull_request:
13+
paths:
14+
- "css-color-4/**"
15+
push:
16+
branches: [main]
17+
paths:
18+
- "css-color-4/**"
19+
workflow_dispatch:
20+
21+
jobs:
22+
publish-TR-css-color-4:
23+
name: Publish css-color-4
24+
if: github.repository == 'w3c/csswg-drafts'
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
- uses: w3c/spec-prod@v2
29+
with:
30+
TOOLCHAIN: bikeshed
31+
SOURCE: css-color-4/Overview.bs
32+
DESTINATION: css-color-4/index.html
33+
BUILD_FAIL_ON: warning
34+
VALIDATE_MARKUP: false
35+
W3C_ECHIDNA_TOKEN: ${{ secrets.TR_TOKEN_CSS_COLOR_4 }}
36+
W3C_WG_DECISION_URL: https://www.w3.org/2025/08/21-css-minutes.html#fc30
37+
W3C_BUILD_OVERRIDE: |
38+
status: CRD

.github/workflows/css-color-5.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
######################################################################
2+
# IMPORTANT: Do not edit this file directly!
3+
#
4+
# This workflow was automatically generated through the
5+
# generate-auto-publish-workflows.py script. To update the workflow,
6+
# make changes to the template file and run the script again.
7+
######################################################################
8+
9+
name: Publish css-color-5 on /TR
10+
11+
on:
12+
pull_request:
13+
paths:
14+
- "css-color-5/**"
15+
push:
16+
branches: [main]
17+
paths:
18+
- "css-color-5/**"
19+
workflow_dispatch:
20+
21+
jobs:
22+
publish-TR-css-color-5:
23+
name: Publish css-color-5
24+
if: github.repository == 'w3c/csswg-drafts'
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
- uses: w3c/spec-prod@v2
29+
with:
30+
TOOLCHAIN: bikeshed
31+
SOURCE: css-color-5/Overview.bs
32+
DESTINATION: css-color-5/index.html
33+
BUILD_FAIL_ON: warning
34+
VALIDATE_MARKUP: false
35+
W3C_ECHIDNA_TOKEN: ${{ secrets.TR_TOKEN_CSS_COLOR_5 }}
36+
W3C_WG_DECISION_URL: https://www.w3.org/2025/08/21-css-minutes.html#fc30
37+
W3C_BUILD_OVERRIDE: |
38+
status: WD
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
######################################################################
2+
# IMPORTANT: Do not edit this file directly!
3+
#
4+
# This workflow was automatically generated through the
5+
# generate-auto-publish-workflows.py script. To update the workflow,
6+
# make changes to the template file and run the script again.
7+
######################################################################
8+
9+
name: Publish css-color-hdr-1 on /TR
10+
11+
on:
12+
pull_request:
13+
paths:
14+
- "css-color-hdr-1/**"
15+
push:
16+
branches: [main]
17+
paths:
18+
- "css-color-hdr-1/**"
19+
workflow_dispatch:
20+
21+
jobs:
22+
publish-TR-css-color-hdr-1:
23+
name: Publish css-color-hdr-1
24+
if: github.repository == 'w3c/csswg-drafts'
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
- uses: w3c/spec-prod@v2
29+
with:
30+
TOOLCHAIN: bikeshed
31+
SOURCE: css-color-hdr-1/Overview.bs
32+
DESTINATION: css-color-hdr-1/index.html
33+
BUILD_FAIL_ON: warning
34+
VALIDATE_MARKUP: false
35+
W3C_ECHIDNA_TOKEN: ${{ secrets.TR_TOKEN_CSS_COLOR_HDR_1 }}
36+
W3C_WG_DECISION_URL: https://www.w3.org/2025/08/21-css-minutes.html#fc30
37+
W3C_BUILD_OVERRIDE: |
38+
status: WD

0 commit comments

Comments
 (0)