Skip to content

Commit 7902760

Browse files
milldrclaude
andcommitted
fix: use timestamped semver tags for library docs releases
- Tag format: library-docs-0.0.YYYYMMDDHHMMSS (e.g., library-docs-0.0.20260106143022) - Creates new release each time instead of overwriting - Build action finds latest library-docs-* release automatically - Uses --latest flag to mark as latest release - Maintains release history 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 87d9d00 commit 7902760

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.github/actions/build-website/action.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,21 @@ runs:
5959
run: |
6060
make init
6161
62-
# Download pre-built library docs from GitHub Release
63-
# The library-docs-generate.yml workflow must have run at least once
62+
# Download pre-built library docs from the latest GitHub Release
63+
# The generate-library.yml workflow must have run at least once
6464
- name: "Download Pre-built Library Docs"
6565
shell: bash
6666
env:
6767
GH_TOKEN: ${{ inputs.repo_access_token }}
6868
run: |
69-
echo "Downloading pre-built library docs from GitHub Release..."
70-
gh release download library-docs-latest \
69+
echo "Finding latest library-docs release..."
70+
LATEST_TAG=$(gh release list --repo ${{ github.repository }} --limit 50 | grep "library-docs-" | head -1 | awk '{print $1}')
71+
if [ -z "$LATEST_TAG" ]; then
72+
echo "Error: No library-docs release found. Run the 'Generate Library' workflow first."
73+
exit 1
74+
fi
75+
echo "Downloading from release: ${LATEST_TAG}"
76+
gh release download "${LATEST_TAG}" \
7177
--repo ${{ github.repository }} \
7278
--pattern "library-docs.tar.gz" \
7379
--dir /tmp

.github/workflows/generate-library.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,13 @@ jobs:
216216
docs/modules/library \
217217
docs/github-actions/library
218218
219-
- name: Delete Existing Release
220-
env:
221-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
222-
run: |
223-
gh release delete library-docs-latest --yes || true
224-
git push origin :refs/tags/library-docs-latest || true
225-
226219
- name: Create Release
227220
env:
228221
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
229222
run: |
230-
gh release create library-docs-latest \
231-
--title "Library Docs (Latest)" \
223+
VERSION="0.0.$(date -u +'%Y%m%d%H%M%S')"
224+
gh release create "library-docs-${VERSION}" \
225+
--title "Library Docs ${VERSION}" \
232226
--notes "Pre-built library documentation for fast preview builds. Generated $(date -u +'%Y-%m-%d %H:%M:%S UTC')." \
233-
--prerelease \
227+
--latest \
234228
library-docs.tar.gz

0 commit comments

Comments
 (0)