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