@@ -22,16 +22,16 @@ jobs:
2222 with:
2323 fetch-depth: 0 # Fetch all history for tags
2424
25- - name: Get latest tag
26- id: get_tag
25+ - name: Get version
26+ id: get_version
2727 run: |
28- # Get the latest tag
29- LATEST_TAG =$(git describe --tags --abbrev=0 2>/dev/null || echo "")
30- if [ -z "$LATEST_TAG " ]; then
28+ # Get the latest tag as the version
29+ VERSION =$(git describe --tags --abbrev=0 2>/dev/null || echo "")
30+ if [ -z "$VERSION " ]; then
3131 # Fallback to commit SHA if no tags found
32- LATEST_TAG ="commit-$(git rev-parse --short HEAD)"
32+ VERSION ="commit-$(git rev-parse --short HEAD)"
3333 fi
34- echo "tag=$LATEST_TAG " >> $GITHUB_OUTPUT
34+ echo "version=$VERSION " >> $GITHUB_OUTPUT
3535
3636 - name: Trigger documentation sync
3737 uses: peter-evans/repository-dispatch@v2
@@ -43,11 +43,10 @@ jobs:
4343 event-type: sync-docs
4444 client-payload: |
4545 {
46- "source_branch": "${{ github.ref_name }}",
47- "tag": "${{ steps.get_tag.outputs.tag }}",
46+ "version": "${{ steps.get_version.outputs.version }}",
4847 "changelog_path": "docs/changelog",
49- "api_gen_path": "docs/api/rpc/gen ",
50- "api_debug_path": "docs/api/rpc/debug ",
48+ "api_gen_path": "docs/api/rpc",
49+ "api_debug_path": "docs/api/rpc",
5150 "api_gen_regex": "gen_(?!dbg_).*",
5251 "api_debug_regex": "gen_dbg_.*"
5352 }
5655 run: |
5756 echo "✅ Triggered documentation sync" >> $GITHUB_STEP_SUMMARY
5857 echo "- Target repository: genlayerlabs/genlayer-docs" >> $GITHUB_STEP_SUMMARY
59- echo "- Source branch: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
60- echo "- Tag: ${{ steps.get_tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
58+ echo "- Version: ${{ steps.get_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
0 commit comments