Skip to content

Commit 0a0bf60

Browse files
author
ID Bot
committed
Setup repository for draft-bradleylundberg-cfrg-arkg using https://github.com/martinthomson/i-d-template
1 parent abeecf4 commit 0a0bf60

File tree

9 files changed

+260
-9
lines changed

9 files changed

+260
-9
lines changed

.circleci/config.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: martinthomson/i-d-template:latest
6+
resource_class: small
7+
working_directory: ~/draft
8+
9+
steps:
10+
- run:
11+
name: "Print Configuration"
12+
command: |
13+
xml2rfc --version
14+
gem list -q kramdown-rfc
15+
echo -n 'mmark '; mmark --version
16+
17+
- restore_cache:
18+
name: "Restoring cache - Git"
19+
keys:
20+
- v2-cache-git-{{ .Branch }}-{{ .Revision }}
21+
- v2-cache-git-{{ .Branch }}
22+
- v2-cache-git-
23+
24+
- restore_cache:
25+
name: "Restoring cache - References"
26+
keys:
27+
- v1-cache-references-{{ epoch }}
28+
- v1-cache-references-
29+
30+
# Workaround for https://discuss.circleci.com/t/22437
31+
- run:
32+
name: Tag Checkout
33+
command: |
34+
if [ -n "$CIRCLE_TAG" ] && [ -d .git ]; then
35+
remote=$(echo "$CIRCLE_REPOSITORY_URL" | \
36+
sed -e 's,/^git.github.com:,https://github.com/,')
37+
git fetch -f "$remote" "refs/tags/$CIRCLE_TAG:refs/tags/$CIRCLE_TAG" || \
38+
(echo 'Removing .git cache for tag build'; rm -rf .git)
39+
fi
40+
41+
- checkout
42+
43+
# Build txt and html versions of drafts
44+
- run:
45+
name: "Build Drafts"
46+
command: make
47+
48+
# Update editor's copy on gh-pages
49+
- run:
50+
name: "Update GitHub Pages"
51+
command: |
52+
if [ "${CIRCLE_TAG#draft-}" == "$CIRCLE_TAG" ]; then
53+
make gh-pages
54+
fi
55+
56+
# For tagged builds, upload to the datatracker.
57+
- deploy:
58+
name: "Upload to Datatracker"
59+
command: |
60+
if [ "${CIRCLE_TAG#draft-}" != "$CIRCLE_TAG" ]; then
61+
make upload
62+
fi
63+
64+
# Archive GitHub Issues
65+
- run:
66+
name: "Archive GitHub Issues"
67+
command: "make archive || make archive DISABLE_ARCHIVE_FETCH=true && make gh-archive"
68+
69+
# Create and store artifacts
70+
- run:
71+
name: "Create Artifacts"
72+
command: "make artifacts CI_ARTIFACTS=/tmp/artifacts"
73+
74+
- store_artifacts:
75+
path: /tmp/artifacts
76+
77+
- run:
78+
name: "Prepare for Caching"
79+
command: "git reflog expire --expire=now --all && git gc --prune=now"
80+
81+
- save_cache:
82+
name: "Saving Cache - Git"
83+
key: v2-cache-git-{{ .Branch }}-{{ .Revision }}
84+
paths:
85+
- ~/draft/.git
86+
87+
- save_cache:
88+
name: "Saving Cache - Drafts"
89+
key: v1-cache-references-{{ epoch }}
90+
paths:
91+
- ~/.cache/xml2rfc
92+
93+
94+
workflows:
95+
version: 2
96+
build:
97+
jobs:
98+
- build:
99+
filters:
100+
tags:
101+
only: /.*?/

.github/workflows/archive.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Archive Issues and Pull Requests"
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0,2,4'
6+
repository_dispatch:
7+
types: [archive]
8+
workflow_dispatch:
9+
inputs:
10+
archive_full:
11+
description: 'Recreate the archive from scratch'
12+
default: false
13+
type: boolean
14+
15+
jobs:
16+
build:
17+
name: "Archive Issues and Pull Requests"
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
21+
steps:
22+
- name: "Checkout"
23+
uses: actions/checkout@v4
24+
25+
# Note: No caching for this build!
26+
27+
- name: "Update Archive"
28+
uses: martinthomson/i-d-template@v1
29+
env:
30+
ARCHIVE_FULL: ${{ inputs.archive_full }}
31+
with:
32+
make: archive
33+
token: ${{ github.token }}
34+
35+
- name: "Update GitHub Pages"
36+
uses: martinthomson/i-d-template@v1
37+
with:
38+
make: gh-archive
39+
token: ${{ github.token }}
40+
41+
- name: "Save Archive"
42+
uses: actions/upload-artifact@v4
43+
with:
44+
path: archive.json

.github/workflows/ghpages.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@ on:
1414
- LICENSE.md
1515
- .gitignore
1616

17-
permissions:
18-
contents: write
19-
2017
jobs:
2118
build:
2219
name: "Update Editor's Copy"
2320
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
2423
steps:
2524
- name: "Checkout"
26-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2726

2827
- name: "Setup"
2928
id: setup
3029
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT"
3130

3231
- name: "Caching"
33-
uses: actions/cache@v3
32+
uses: actions/cache@v4
3433
with:
3534
path: |
3635
.refcache
@@ -52,3 +51,10 @@ jobs:
5251
with:
5352
make: gh-pages
5453
token: ${{ github.token }}
54+
55+
- name: "Archive Built Drafts"
56+
uses: actions/upload-artifact@v4
57+
with:
58+
path: |
59+
draft-*.html
60+
draft-*.txt

.github/workflows/publish.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Publish New Draft Version"
2+
3+
on:
4+
push:
5+
tags:
6+
- "draft-*"
7+
workflow_dispatch:
8+
inputs:
9+
email:
10+
description: "Submitter email"
11+
default: ""
12+
type: string
13+
14+
jobs:
15+
build:
16+
name: "Publish New Draft Version"
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: "Checkout"
20+
uses: actions/checkout@v4
21+
22+
# See https://github.com/actions/checkout/issues/290
23+
- name: "Get Tag Annotations"
24+
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
25+
26+
- name: "Setup"
27+
id: setup
28+
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT"
29+
30+
- name: "Caching"
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
.refcache
35+
.venv
36+
.gems
37+
node_modules
38+
.targets.mk
39+
key: i-d-${{ steps.setup.outputs.date }}
40+
restore-keys: i-d-
41+
42+
- name: "Build Drafts"
43+
uses: martinthomson/i-d-template@v1
44+
with:
45+
token: ${{ github.token }}
46+
47+
- name: "Upload to Datatracker"
48+
uses: martinthomson/i-d-template@v1
49+
with:
50+
make: upload
51+
env:
52+
UPLOAD_EMAIL: ${{ inputs.email }}
53+
54+
- name: "Archive Submitted Drafts"
55+
uses: actions/upload-artifact@v4
56+
with:
57+
path: "versioned/draft-*-[0-9][0-9].*"

.github/workflows/update.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Update Generated Files"
2+
# This rule is not run automatically.
3+
# It can be run manually to update all of the files that are part
4+
# of the template, specifically:
5+
# - README.md
6+
# - CONTRIBUTING.md
7+
# - .note.xml
8+
# - .github/CODEOWNERS
9+
# - Makefile
10+
#
11+
#
12+
# This might be useful if you have:
13+
# - added, removed, or renamed drafts (including after adoption)
14+
# - added, removed, or changed draft editors
15+
# - changed the title of drafts
16+
#
17+
# Note that this removes any customizations you have made to
18+
# the affected files.
19+
on: workflow_dispatch
20+
21+
jobs:
22+
build:
23+
name: "Update Files"
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: "Checkout"
27+
uses: actions/checkout@v4
28+
29+
- name: "Update Generated Files"
30+
uses: martinthomson/i-d-template@v1
31+
with:
32+
make: update-files
33+
token: ${{ github.token }}
34+
35+
- name: "Push Update"
36+
run: git push

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*~
88
.tags
99
/*-[0-9][0-9].xml
10+
/.*.mk
1011
/.gems/
1112
/.refcache
12-
/.targets.mk
1313
/.venv/
1414
/.vscode/
1515
/lib

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ repository constitutes Contributions to the IETF Standards Process
1515
You agree to comply with all applicable IETF policies and procedures, including,
1616
BCP 78, 79, the TLP, and the TLP rules regarding code components (e.g. being
1717
subject to a Simplified BSD License) in Contributions.
18+
19+
1820
## Working Group Information
1921

2022
Discussion of this work occurs on the [Crypto Forum

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ include $(LIBDIR)/main.mk
44
$(LIBDIR)/main.mk:
55
ifneq (,$(shell grep "path *= *$(LIBDIR)" .gitmodules 2>/dev/null))
66
git submodule sync
7-
git submodule update $(CLONE_ARGS) --init
7+
git submodule update --init
88
else
9-
git clone -q --depth 10 $(CLONE_ARGS) \
10-
-b main https://github.com/martinthomson/i-d-template $(LIBDIR)
9+
ifneq (,$(wildcard $(ID_TEMPLATE_HOME)))
10+
ln -s "$(ID_TEMPLATE_HOME)" $(LIBDIR)
11+
else
12+
git clone -q --depth 10 -b main \
13+
https://github.com/martinthomson/i-d-template $(LIBDIR)
14+
endif
1115
endif

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ $ make
2727

2828
Command line usage requires that you have the necessary software installed. See
2929
[the instructions](https://github.com/martinthomson/i-d-template/blob/main/doc/SETUP.md).
30+

0 commit comments

Comments
 (0)