Procházet zdrojové kódy

[ci] apidoc: restore #8bc7263

k před 2 roky
rodič
revize
59c18cd27e

+ 16 - 1
.github/workflows/main.yml

@@ -305,8 +305,23 @@ jobs:
           ldd -v ./haxe
           ldd -v ./haxelib
 
+      # https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
+      - name: Extract branch name
+        id: extract_branch
+        shell: bash
+        run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
+
       - name: Build xmldoc
-        run: make xmldoc
+        run: |
+          set -ex
+          make -s xmldoc
+          cat >extra/doc/info.json <<EOL
+            {
+              "commit": "$GITHUB_SHA",
+              "branch": "$GITHUB_REF"
+              "branch": "${{ steps.extract_branch.outputs.branch }}"
+            }
+          EOL
 
       - name: Upload artifact
         uses: actions/[email protected]

+ 16 - 1
extra/github-actions/workflows/main.yml

@@ -118,8 +118,23 @@ jobs:
           ldd -v ./haxe
           ldd -v ./haxelib
 
+      # https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
+      - name: Extract branch name
+        id: extract_branch
+        shell: bash
+        run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
+
       - name: Build xmldoc
-        run: make xmldoc
+        run: |
+          set -ex
+          make -s xmldoc
+          cat >extra/doc/info.json <<EOL
+            {
+              "commit": "$GITHUB_SHA",
+              "branch": "$GITHUB_REF"
+              "branch": "${{ steps.extract_branch.outputs.branch }}"
+            }
+          EOL
 
       - name: Upload artifact
         uses: actions/[email protected]