-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: martinthomson/i-d-template:latest | ||
resource_class: small | ||
working_directory: ~/draft | ||
|
||
steps: | ||
- run: | ||
name: "Print Configuration" | ||
command: | | ||
xml2rfc --version | ||
gem list -q kramdown-rfc | ||
echo -n 'mmark '; mmark --version | ||
- restore_cache: | ||
name: "Restoring cache - Git" | ||
keys: | ||
- v2-cache-git-{{ .Branch }}-{{ .Revision }} | ||
- v2-cache-git-{{ .Branch }} | ||
- v2-cache-git- | ||
|
||
- restore_cache: | ||
name: "Restoring cache - References" | ||
keys: | ||
- v1-cache-references-{{ epoch }} | ||
- v1-cache-references- | ||
|
||
# Workaround for https://discuss.circleci.com/t/22437 | ||
- run: | ||
name: Tag Checkout | ||
command: | | ||
if [ -n "$CIRCLE_TAG" ] && [ -d .git ]; then | ||
remote=$(echo "$CIRCLE_REPOSITORY_URL" | \ | ||
sed -e 's,/^git.github.com:,https://github.com/,') | ||
git fetch -f "$remote" "refs/tags/$CIRCLE_TAG:refs/tags/$CIRCLE_TAG" || \ | ||
(echo 'Removing .git cache for tag build'; rm -rf .git) | ||
fi | ||
- checkout | ||
|
||
# Build txt and html versions of drafts | ||
- run: | ||
name: "Build Drafts" | ||
command: make | ||
|
||
# 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 | ||
# Archive GitHub Issues | ||
- run: | ||
name: "Archive GitHub Issues" | ||
command: "make archive || make archive DISABLE_ARCHIVE_FETCH=true && make gh-archive" | ||
|
||
# Create and store artifacts | ||
- run: | ||
name: "Create Artifacts" | ||
command: "make artifacts CI_ARTIFACTS=/tmp/artifacts" | ||
|
||
- store_artifacts: | ||
path: /tmp/artifacts | ||
|
||
- run: | ||
name: "Prepare for Caching" | ||
command: "git reflog expire --expire=now --all && git gc --prune=now" | ||
|
||
- save_cache: | ||
name: "Saving Cache - Git" | ||
key: v2-cache-git-{{ .Branch }}-{{ .Revision }} | ||
paths: | ||
- ~/draft/.git | ||
|
||
- save_cache: | ||
name: "Saving Cache - Drafts" | ||
key: v1-cache-references-{{ epoch }} | ||
paths: | ||
- ~/.cache/xml2rfc | ||
|
||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- build: | ||
filters: | ||
tags: | ||
only: /.*?/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# License | ||
|
||
See the | ||
[guidelines for contributions](https://github.com/core-wg/pubsub/blob/master/CONTRIBUTING.md). | ||
[guidelines for contributions](https://github.com/{GITHUB_USER}/{GITHUB_REPO}/blob/{GITHUB_BRANCH}/CONTRIBUTING.md). |