[latex3-commits] [git/LaTeX3-latex3-latex2e] gh-selective-release: Only build released components for non dev-/release- tags (e8985e6d)

Marcel Fabian Krüger tex at 2krueger.de
Fri Dec 17 10:31:36 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh-selective-release
Link       : https://github.com/latex3/latex2e/commit/e8985e6db3f1df3e2263eef894d4e703cb41a87e

>---------------------------------------------------------------

commit e8985e6db3f1df3e2263eef894d4e703cb41a87e
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu Dec 16 18:53:26 2021 +0100

    Only build released components for non dev-/release- tags


>---------------------------------------------------------------

e8985e6db3f1df3e2263eef894d4e703cb41a87e
 .github/workflows/deploy.yaml | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index 223e27a3..b29c26b7 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -39,14 +39,35 @@ jobs:
           restore-keys: texlive-v0-
       # We need Ghostscript for dvips and XeTeX tests.
       - run: sudo apt-get update && sudo apt-get install ghostscript
+      # Determine the name of the tag we are working on. Sadly GH Actions only provides
+      # github.ref which has the name prefixed with github.ref and no way to remove a prefix
+      # in normal expressions, so we need an action for that.
+      - name: Get name
+        uses: frabert/replace-string-action at 9b62dfe3ae936b1cc380f2421c8ac9e63a4a3e85
+        id: name
+        if: ${{ always() }}
+        with:
+          pattern: "^refs/(?:heads|tags)/"
+          string: ${{ github.ref }}
+          replace-with: ""
       - name: Install TeX Live
         uses: zauguin/install-texlive at v1
         with:
           # List the required TeX Live packages in a separate file to allow reuse in
           # different workflows.
           package_file: .github/tl_packages
+      # For tags starting with dev- or release- we do full builds of all components
       - name: Run l3build
+        if: ${{ startsWith(github.ref, 'refs/tags/dev-') || startsWith(github.ref, 'refs/tags/release-') }}
         run: l3build ctan -q -H --show-log-on-error
+      # Otherwise we assume that the part before the first -2 is the name of the `required` package we want to
+      # build. Therefore we switch to the right directors first. Afterwards we have to move the generated artifacts
+      # back to the main directory so that they are found in the next step.
+      - name: Run l3build
+        if: ${{ !(startsWith(github.ref, 'refs/tags/dev-') || startsWith(github.ref, 'refs/tags/release-')) }}
+        env:
+          tagname: ${{steps.name.outputs.replaced}}
+        run: cd "required/${tagname%%-2*}" && l3build ctan -q -H --show-log-on-error && mv *.zip ../../
       - name: Archive failed test output
         if: ${{ failure() }}
         uses: actions/upload-artifact at v2
@@ -63,17 +84,6 @@ jobs:
           artifacts: "*.zip"
           token: ${{ secrets.GITHUB_TOKEN }}
           prerelease: ${{ startsWith(github.ref, 'refs/tags/dev-') }}
-      # Determine the name of the tag we are working on. Sadly GH Actions only provides
-      # github.ref which has the name prefixed with github.ref and no way to remove a prefix
-      # in normal expressions, so we need an action for that.
-      - name: Get name
-        uses: frabert/replace-string-action at 9b62dfe3ae936b1cc380f2421c8ac9e63a4a3e85
-        id: name
-        if: ${{ always() }}
-        with:
-          pattern: "^refs/(?:heads|tags)/"
-          string: ${{ github.ref }}
-          replace-with: ""
       # While the normal notification job only informs about failed runs, we additionally want to notify about successful releases.
       - name: Send mail
         # The explicit commit hash ensures that this can't be used by dawidd6 as a





More information about the latex3-commits mailing list.