Skip to content

Commit f78e507

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

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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: Get Latest Patch Version
25+
id: get_patch
26+
run: |
27+
git fetch --tags
28+
latest_patch=$(git tag --list "v${{ inputs.version }}.*" --sort=-v:refname | head -n 1)
29+
if [ -z "$latest_patch" ]; then
30+
echo "No tags found for version prefix v${{ inputs.version }}.*"
31+
exit 1
32+
fi
33+
echo "Latest patch version found: $latest_patch"
34+
echo "latest_patch=$latest_patch" >> $GITHUB_OUTPUT
35+
36+
publish_tag_docs:
37+
needs: find_latest_patch
38+
uses: ./.github/workflows/yardoc.yml
39+
with:
40+
ref_name: v${{ needs.find_latest_patch.outputs.latest_patch }}
41+
ref_type: tag

0 commit comments

Comments
 (0)