9 Commits

Author SHA1 Message Date
Tony
3db8d566e6 update dependencies
All checks were successful
Build and publish CMBA rulebooks (Gitea) / build-release (push) Successful in 10s
2026-01-14 10:29:08 -06:00
Tony
79ebe28ecc add github css
Some checks failed
Build and publish CMBA rulebooks (Gitea) / build-release (push) Failing after 10s
2026-01-14 10:27:19 -06:00
Tony
cdf3479260 fix curl
All checks were successful
Build and publish CMBA rulebooks (Gitea) / build-release (push) Successful in 1m6s
2026-01-14 10:05:14 -06:00
Tony
245c4ed28f think i fixed yaml
All checks were successful
Build and publish CMBA rulebooks (Gitea) / build-release (push) Successful in 1m27s
2026-01-14 10:01:22 -06:00
Tony
f78172f2af maybe fix curl issue 2026-01-14 09:50:03 -06:00
Tony
163af81f31 try new api url
All checks were successful
Build and publish CMBA rulebooks (Gitea) / build-release (push) Successful in 1m47s
2026-01-14 09:37:52 -06:00
Tony
7fd132dec0 add missing dollar sign
Some checks failed
Build and publish CMBA rulebooks (Gitea) / build-release (push) Failing after 1m16s
2026-01-14 09:21:48 -06:00
Tony
40c9f27952 test workflow
Some checks failed
Build and publish CMBA rulebooks (Gitea) / build-release (push) Failing after 1m18s
2026-01-14 09:18:21 -06:00
688025aa44 2024 corrections, clarifications, and modifications
By-Laws and Rules updates for 2024 season.

Modification: Added affordances for using "last out" as a DR if there is no one on the bench (proposed via email, committeed 5/31/2024, voted in GroupMe chat 6/5/2024)
Correction: Correct "Uniform" section, addresses #11
Clarification: Reworded "no game" and "slaughter rule," addresses #9
Clarification: A llow president to postpone games for extraordinary circumstances, addresses #10

commit 6143d0fdd9
Author: Anthony Correa <a@correa.co>
Date:   Thu Jun 6 06:42:14 2024 -0500

    build

commit e34297f200
Author: Anthony Correa <a@correa.co>
Date:   Thu Jun 6 06:35:10 2024 -0500

    update publish date

commit ae31a90185
Author: Anthony Correa <a@correa.co>
Date:   Thu Jun 6 06:32:34 2024 -0500

    DR using last out

    Addresses #13

commit 89e0973c27
Author: Anthony Correa <a@correa.co>
Date:   Fri Jan 19 15:20:34 2024 -0600

    postponing games in extraordinary circumstances.

    address #10

commit 6d7d0531ce
Author: Anthony Correa <a@correa.co>
Date:   Fri Jan 19 15:19:29 2024 -0600

    removed "extraordinary circumstances", add "not resumed"

    this doesn't really apply, as the league does not resume suspended games in the regular season.

commit 2b29a561da
Author: Anthony Correa <a@correa.co>
Date:   Fri Jan 19 14:47:38 2024 -0600

    update readme with github pages instructions

commit 9a3939f42e
Author: Anthony Correa <a@correa.co>
Date:   Fri Jan 19 14:20:46 2024 -0600

    update metadata date

commit 063f66fc6b
Author: Anthony Correa <a@correa.co>
Date:   Fri Jan 19 13:41:57 2024 -0600

    clarify 'no game' and slaughter rule

    address issue #9

commit 8c91733d65
Author: Anthony Correa <a@correa.co>
Date:   Fri Jan 19 13:04:29 2024 -0600

    move uniform to correct section

    address issue #11
    remove "Uniform" from section "Team Rosters; Players and Eligibility; Uniforms"
    "Uniform" subsection stays in "Teams and Managers" section
    Add "Player Uniforms" reference to "Uniform" subsection in "General Play"
2024-06-06 06:57:56 -05:00

107
.github/workflows/release-docs.yml vendored Normal file
View File

@@ -0,0 +1,107 @@
name: Build and publish CMBA rulebooks (Gitea)
on:
push:
tags:
- "v*"
jobs:
build-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
# texlive-latex-recommended \
# texlive-fonts-recommended \
# texlive-latex-extra \
sudo apt-get install -y pandoc \
jq \
curl
- name: Build artifacts
run: |
set -euo pipefail
mkdir -p dist
mkdir -p assets_tmp
curl -fsSL \
-o assets_tmp/github-markdown.css \
https://raw.githubusercontent.com/sindresorhus/github-markdown-css/main/github-markdown.css
for doc in cmba-bylaws; do
# Mobile-friendly HTML with TOC + serif styling
pandoc "src/${doc}.md" \
--toc \
--standalone \
--metadata title="CMBA ${doc}" \
--css assets_tmp/github-markdown.css \
-o "dist/${doc}.html"
# PDF
# pandoc "src/${doc}.md" \
# --metadata title="CMBA ${doc}" \
# -o "dist/${doc}.pdf"
done
# Include source markdown for transparency
cp src/${doc}.md dist/
- name: Create or update Gitea Release and upload assets
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_BASE_URL: ${{ secrets.GITEA_BASE_URL }}
# Gitea provides these variables in Actions:
REPO: ${{ gitea.repository }} # "owner/repo"
TAG: ${{ gitea.ref_name }} # e.g. "v2026.0"
run: |
set -euo pipefail
OWNER="$(echo "$REPO" | cut -d/ -f1)"
NAME="$(echo "$REPO" | cut -d/ -f2)"
API="${GITHUB_API_URL}"
AUTH="Authorization: token ${GITEA_TOKEN}"
echo "Repo: $OWNER/$NAME"
echo "Tag: $TAG"
echo "API: $API"
# Check if release exists for this tag
existing_release_json="$(curl -sS -H "$AUTH" \
"$API/repos/$OWNER/$NAME/releases/tags/$TAG" || true)"
if echo "$existing_release_json" | jq -e '.id' >/dev/null 2>&1; then
RELEASE_ID="$(echo "$existing_release_json" | jq -r '.id')"
echo "Release exists (id=$RELEASE_ID)."
else
echo "Creating release for tag $TAG..."
create_json="$(curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
"$API/repos/$OWNER/$NAME/releases" \
-d "$(jq -n --arg tag "$TAG" --arg name "$TAG" \
'{tag_name:$tag, name:$name, draft:false, prerelease:false, body:"CMBA rulebooks release."}')")"
RELEASE_ID="$(echo "$create_json" | jq -r '.id')"
echo "Created release (id=$RELEASE_ID)."
fi
# Upload each file as an asset. If an asset already exists with same name, delete then re-upload.
assets_json="$(curl -sS -H "$AUTH" "$API/repos/$OWNER/$NAME/releases/$RELEASE_ID/assets" || echo '[]')"
for f in dist/*; do
filename="$(basename "$f")"
existing_asset_id="$(echo "$assets_json" | jq -r --arg n "$filename" '.[] | select(.name==$n) | .id' | head -n1 || true)"
if [ -n "${existing_asset_id:-}" ] && [ "$existing_asset_id" != "null" ]; then
echo "Deleting existing asset: $filename (id=$existing_asset_id)"
curl -sS -X DELETE -H "$AUTH" \
"$API/repos/$OWNER/$NAME/releases/$RELEASE_ID/assets/$existing_asset_id" >/dev/null
fi
echo "Uploading $filename"
curl -sS --fail -X POST -H "$AUTH" -H "Accept: application/json" -F "attachment=@$f" "$API/repos/$OWNER/$NAME/releases/$RELEASE_ID/assets?name=$filename" >/dev/null
done
echo "Done. Release page: ${GITEA_BASE_URL}/${OWNER}/${NAME}/releases/tag/${TAG}"