/
config.yml
71 lines (62 loc) · 1.69 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: 2
jobs:
build:
docker:
- image: martinthomson/i-d-template:latest
working_directory: ~/draft
steps:
- checkout
# Prime caches for faster checkout
- restore_cache:
keys:
- git-reference
- run:
name: "Update Cache"
command: "git -C ~/git-reference fetch --all --prune"
- save_cache:
key: git-reference
paths:
- ~/git-reference
# Build txt and html versions of drafts
- restore_cache:
keys:
- refcache
- run:
name: "Build Drafts"
command: "make 'CLONE_ARGS=--reference ~/git-reference'"
- save_cache:
key: refcache
paths:
- ~/.cache/xml2rfc
# Create and store artifacts
- run:
name: "Create Artifacts"
command: "make artifacts CI_ARTIFACTS=/tmp/artifacts"
- store_artifacts:
path: /tmp/artifacts
# Update editor's copy on gh-pages
- run:
name: "Update GitHub Pages"
command: |
if [ "${CIRCLE_TAG#draft-}" == "${CIRCLE_TAG}" ]; then
make gh-pages
fi
# For tagged builds, upload to the datatracker.
- deploy:
name: "Upload to Datatracker"
command: |
if [ "${CIRCLE_TAG#draft-}" != "${CIRCLE_TAG}" ]; then
make upload
fi
# Save GitHub issues
- run:
name: "Save GitHub Issues"
command: "make issues || make issues DISABLE_ISSUE_FETCH=true && make gh-issues"
workflows:
version: 2
build:
jobs:
- build:
filters:
tags:
only: /.*?/