File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ env :
12+ RUBY_VERSION : 3.1.4
13+
14+ permissions :
15+ contents : write
16+
17+ concurrency :
18+ group : ${{ github.workflow }}-${{ github.ref_name }}-${{ inputs.version }}
19+ cancel-in-progress : true
20+
21+ jobs :
22+ find_latest_patch :
23+ runs-on : ubuntu-latest
24+ outputs :
25+ latest_patch : ${{ steps.get_patch.outputs.latest_patch }}
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v4
29+ - uses : ruby/setup-ruby@v1
30+ with :
31+ ruby-version : ${{ env.RUBY_VERSION }}
32+ bundler-cache : true
33+ - name : Get Latest Patch Version
34+ id : get_patch
35+ run : |
36+ latest_patch=$(git tag --list "v${{ inputs.version }}.*" --sort=-v:refname | head -n 1)
37+ if [ -z "$latest_patch" ]; then
38+ echo "No tags found for version prefix v${{ inputs.version }}.*"
39+ exit 1
40+ fi
41+ echo "Latest patch version found: $latest_patch"
42+ echo "latest_patch=$latest_patch" >> $GITHUB_OUTPUT
43+
44+ publish_tag_docs :
45+ needs : find_latest_patch
46+ uses : ./.github/workflows/yardoc.yml
47+ with :
48+ ref_name : v${{ needs.find_latest_patch.outputs.latest_patch }}
49+ ref_type : tag
You can’t perform that action at this time.
0 commit comments