[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Merge pull request #733 from latex3/gh-selective-release (43a484ec)

GitHub noreply at github.com
Mon Oct 24 21:16:02 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/43a484ec5a50cbd707e1a4b1051d07f30ea9a03c

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

commit 43a484ec5a50cbd707e1a4b1051d07f30ea9a03c
Merge: eb9a772a e8985e6d
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Oct 24 20:16:02 2022 +0100

    Merge pull request #733 from latex3/gh-selective-release
    
    Only build released components for non dev-/release- tags


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

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

diff --cc .github/workflows/deploy.yaml
index 9b47e1cb,b29c26b7..0cfaf3d0
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@@ -35,23 -35,45 +35,44 @@@ jobs
          uses: actions/cache at v2
          with:
            path: ~/texlive
 -          key: texlive-v0-${{ steps.get-id.outputs.id }}
 -          restore-keys: texlive-v0-
 +          key: texlive2022-v0-${{ steps.get-id.outputs.id }}
 +          restore-keys: texlive2022-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
 +        if: ${{ always() }}
 +        uses: zauguin/l3build-failure-artifacts at v1
          with:
            name: testfiles
 -          path: build/test*/*.diff
            # Decide how long to keep the test output artifact:
            retention-days: 3
        # Now create the release (this only runs if the previous steps were successful)





More information about the latex3-commits mailing list.