summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rwxr-xr-x.github/workflows/linearize.sh4
-rw-r--r--.github/workflows/linearize.yml2
2 files changed, 5 insertions, 1 deletions
diff --git a/.github/workflows/linearize.sh b/.github/workflows/linearize.sh
index 07f22b08..36dfa50d 100755
--- a/.github/workflows/linearize.sh
+++ b/.github/workflows/linearize.sh
@@ -90,6 +90,7 @@ while read -r chapter; do
sed -Ei 's,\bdocs/,,' "docs/$chapter/README.md"
git add README.md "docs/$chapter/README.md" pom.xml
+ # Create a commit for the chapter, using the metadata.
if [[ ! "$first_author" =~ ^(.*)\ \<(.*)\>$ ]]; then
echo "First author does not match pattern" >&2
exit 1
@@ -99,4 +100,7 @@ while read -r chapter; do
GIT_AUTHOR_NAME="$name" GIT_AUTHOR_EMAIL="$email" GIT_AUTHOR_DATE="$author_date" \
GIT_COMMITTER_NAME="$name" GIT_COMMITTER_EMAIL="$email" GIT_COMMITTER_DATE="$committer_date" \
git commit -q -m "$message"
+
+ # Tag the chapter, so it can be stably linked.
+ git tag "linear-$chapter"
done
diff --git a/.github/workflows/linearize.yml b/.github/workflows/linearize.yml
index 76345f4c..a5bbe400 100644
--- a/.github/workflows/linearize.yml
+++ b/.github/workflows/linearize.yml
@@ -23,6 +23,6 @@ jobs:
git fetch linear
git checkout -b linear linear/main
git remote remove linear
- git push -f origin linear
+ git push -f origin refs/heads/linear 'refs/tags/linear-chapter*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}