Skip to content

Commit 3b6bef7

Browse files
committed
Add action to manually publish docs
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
1 parent dc4e65a commit 3b6bef7

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Manually Publish Documentation
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version tag to publish: <major>.<minor>"
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: write
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ inputs.version }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
find_latest_patch:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
latest_patch: ${{ steps.get_patch.outputs.latest_patch }}
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v5
26+
- name: Get Latest Patch Version
27+
id: get_patch
28+
run: |
29+
git fetch --tags
30+
latest_patch=$(git tag --list "v${{ inputs.version }}.*" --sort=-v:refname | head -n 1)
31+
if [ -z "$latest_patch" ]; then
32+
echo "No tags found for version prefix v${{ inputs.version }}.*"
33+
exit 1
34+
fi
35+
echo "Latest patch version found: $latest_patch"
36+
echo "latest_patch=$latest_patch" >> $GITHUB_OUTPUT
37+
38+
publish_tag_docs:
39+
needs: find_latest_patch
40+
uses: ./.github/workflows/yardoc.yml
41+
with:
42+
ref_name: ${{ needs.find_latest_patch.outputs.latest_patch }}
43+
ref_type: tag

0 commit comments

Comments
 (0)