From 2fc626bda4a136e341ea12d8f3d25a234318e0b4 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 15:54:34 +0200 Subject: [PATCH 01/17] new workflow for daily release --- .github/workflows/build.yaml | 116 ++++++++++++++++------------------- 1 file changed, 54 insertions(+), 62 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7cb23b5e0..a3d943591 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,12 +1,48 @@ on: workflow_dispatch: - schedule: - - cron: '5 4 * * *' + #schedule: + # - cron: '5 4 * * *' name: Build TinyTeX Bundles +env: + # for gh usage with external repo + GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} + GH_REPO: cderv/tinytex-releases + jobs: + new-release: + runs-on: ubuntu-latest + name: Create new daily draft release + outputs: + tag: ${{ steps.draft.outputs.tag }} + draft-tag: ${{ steps.draft.outputs.draft-tag }} + + steps: + - name: Configure Git + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + + - name: Create temp tag + run: | + git tag pre-daily + git push --tags + - name: Create release note + run: | + echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r'))." > .github/notes.md + echo "Please see https://github.com/yihui/tinytex-releases for more info." >> .github/notes.md + + - name: Create new draft release + id: draft + run: | + tag=daily + url=$(gh -R cderv/tinytex-releases release create ${tag} --draft --prerelease --title "TinyTeX daily build" --notes-file ".github/notes.md") + echo "::set-output name=draft-tag::$(echo $url | grep -o tag/[^/]*$ | cut -c 5-)" + echo "::set-output name=tag::${tag}" + build-windows: + needs: [new-release] runs-on: windows-latest name: Build Bundles For Windows @@ -72,16 +108,11 @@ jobs: - run: dir . - name: Upload bundles - uses: actions/upload-artifact@v3 - with: - name: bundles - path: | - TinyTeX*.zip - tinitex.zip - if-no-files-found: error - retention-days: 1 + run: | + gh release upload ${{needs.new-release.outputs.draft}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip tinytex.zip build-linux: + needs: [new-release] runs-on: ubuntu-latest name: Build Bundles For Linux @@ -152,18 +183,11 @@ jobs: - run: ls -lisa - name: Upload bundles - uses: actions/upload-artifact@v3 - with: - name: bundles - path: | - TinyTeX*.tar.gz - tinitex.tar.gz - installer-unix.tar.gz - regex.tar.gz - if-no-files-found: error - retention-days: 1 + run: | + gh release upload ${{needs.new-release.outputs.draft}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz tinytex.zip installer-unix.tar.gz regex.tar.gz build-mac: + needs: [new-release] runs-on: macos-latest name: Build Bundles For macOS @@ -222,58 +246,26 @@ jobs: - run: ls -lisa - name: Upload bundles - uses: actions/upload-artifact@v3 - with: - name: bundles - path: | - TinyTeX*.tgz - tinitex.tgz - if-no-files-found: error - retention-days: 1 + run: | + gh release upload ${{needs.new-release.outputs.draft}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz tinytex.tgz deploy: - needs: [build-windows, build-linux, build-mac] + needs: [new-release, build-windows, build-linux, build-mac] runs-on: ubuntu-latest - name: deploy artifacts as Github release - + name: Publish new daily release + steps: - - uses: actions/download-artifact@v3 - with: - name: bundles - path: ${{ runner.temp }}/tinytex-bundles - - - run: ls -lisa tinytex-bundles - working-directory: ${{ runner.temp }} - - - name: Get Date for bundles - run: echo "CURRENT_DATE=($(date +'%A %B %d %Y %r'))" >> $GITHUB_ENV - - - name: Create draft release with new assets - id: draft-release - uses: softprops/action-gh-release@v1 - with: - repository: yihui/tinytex-releases - token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} - draft: true - prerelease: true - name: TinyTeX daily build - body: | - This release contains the daily build of TinyTeX${{ env.CURRENT_DATE }}. - Please see https://github.com/yihui/tinytex-releases for more info. - files: ${{ runner.temp }}/tinytex-bundles/* - fail_on_unmatched_files: true - generate_release_notes: false - - name: Publish new release env: GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} - GH_REPO: yihui/tinytex-releases + GH_REPO: cderv/tinytex-releases run: | echo "::group::Move tag to last commit on master" sha=$(gh api repos/{owner}/{repo}/git/ref/heads/master --jq '.object.sha') gh api repos/{owner}/{repo}/git/refs/tags/daily -f sha=$sha --template 'Tag {{.ref | color "blue"}} moved on commit sha {{.object.sha | color "blue"}}.' echo -e "\n::endgroup::" - echo "::group::delete current release and undraft new" - gh release delete daily -y - gh api repos/{owner}/{repo}/releases/${{ steps.draft-release.outputs.id}} -f draft=false -f tag_name='daily' --template 'Release url: {{.html_url}}' + echo "::group::undraft new and delete current release" + old=$(gh release edit ${{needs.new-release.outputs.tag}} --draft=true | grep -o tag/[^/]*$ | cut -c 5-) + gh release edit ${{needs.new-release.outputs.draft}} --draft=false + gh release delete ${old} -y echo -e "\n::endgroup::" From b04cf82e6f3431fd90080a3f4279daf108b460bb Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 15:57:25 +0200 Subject: [PATCH 02/17] Update the note at the end --- .github/workflows/build.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a3d943591..604b13e9d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,16 +28,12 @@ jobs: run: | git tag pre-daily git push --tags - - name: Create release note - run: | - echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r'))." > .github/notes.md - echo "Please see https://github.com/yihui/tinytex-releases for more info." >> .github/notes.md - name: Create new draft release id: draft run: | tag=daily - url=$(gh -R cderv/tinytex-releases release create ${tag} --draft --prerelease --title "TinyTeX daily build" --notes-file ".github/notes.md") + url=$(gh -R cderv/tinytex-releases release create ${tag} --draft --prerelease --title "TinyTeX daily build" --notes "(WIP) Next daily release") echo "::set-output name=draft-tag::$(echo $url | grep -o tag/[^/]*$ | cut -c 5-)" echo "::set-output name=tag::${tag}" @@ -253,8 +249,12 @@ jobs: needs: [new-release, build-windows, build-linux, build-mac] runs-on: ubuntu-latest name: Publish new daily release - + steps: + - name: Create release note + run: | + echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r'))." > .github/notes.md + echo "Please see https://github.com/yihui/tinytex-releases for more info." >> .github/notes.md - name: Publish new release env: GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} @@ -266,6 +266,6 @@ jobs: echo -e "\n::endgroup::" echo "::group::undraft new and delete current release" old=$(gh release edit ${{needs.new-release.outputs.tag}} --draft=true | grep -o tag/[^/]*$ | cut -c 5-) - gh release edit ${{needs.new-release.outputs.draft}} --draft=false + gh release edit ${{needs.new-release.outputs.draft}} --draft=false --notes-file .github/notes.md gh release delete ${old} -y echo -e "\n::endgroup::" From e73b570296c48566fae4279eaa07d31e461664c8 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 15:59:55 +0200 Subject: [PATCH 03/17] git is not needed anymore --- .github/workflows/build.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 604b13e9d..daf2c95b1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,16 +19,6 @@ jobs: draft-tag: ${{ steps.draft.outputs.draft-tag }} steps: - - name: Configure Git - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - - - name: Create temp tag - run: | - git tag pre-daily - git push --tags - - name: Create new draft release id: draft run: | From 136d3772a3c1aa20f74dc3aa7dd14296e0dc7335 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 16:09:26 +0200 Subject: [PATCH 04/17] correct bundle name --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index daf2c95b1..c8b3dc38a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -170,7 +170,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz tinytex.zip installer-unix.tar.gz regex.tar.gz + gh release upload ${{needs.new-release.outputs.draft}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz tinytex.tar.gz installer-unix.tar.gz regex.tar.gz build-mac: needs: [new-release] From 269defcc3e513275409fcfcea0b053436b2bc440 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 16:23:03 +0200 Subject: [PATCH 05/17] correct input name --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c8b3dc38a..c40e32eb3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -95,7 +95,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip tinytex.zip + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip tinytex.zip build-linux: needs: [new-release] @@ -170,7 +170,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz tinytex.tar.gz installer-unix.tar.gz regex.tar.gz + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz tinytex.tar.gz installer-unix.tar.gz regex.tar.gz build-mac: needs: [new-release] @@ -233,7 +233,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz tinytex.tgz + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz tinytex.tgz deploy: needs: [new-release, build-windows, build-linux, build-mac] @@ -256,6 +256,6 @@ jobs: echo -e "\n::endgroup::" echo "::group::undraft new and delete current release" old=$(gh release edit ${{needs.new-release.outputs.tag}} --draft=true | grep -o tag/[^/]*$ | cut -c 5-) - gh release edit ${{needs.new-release.outputs.draft}} --draft=false --notes-file .github/notes.md + gh release edit ${{needs.new-release.outputs.draft-tag}} --draft=false --notes-file .github/notes.md gh release delete ${old} -y echo -e "\n::endgroup::" From a2f283b1ef35d976370930410c5dffe133500bda Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 16:30:58 +0200 Subject: [PATCH 06/17] Add a cleaning step in case of issue in workflow --- .github/workflows/build.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c40e32eb3..ff55fdfe0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -246,9 +246,6 @@ jobs: echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r'))." > .github/notes.md echo "Please see https://github.com/yihui/tinytex-releases for more info." >> .github/notes.md - name: Publish new release - env: - GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} - GH_REPO: cderv/tinytex-releases run: | echo "::group::Move tag to last commit on master" sha=$(gh api repos/{owner}/{repo}/git/ref/heads/master --jq '.object.sha') @@ -259,3 +256,13 @@ jobs: gh release edit ${{needs.new-release.outputs.draft-tag}} --draft=false --notes-file .github/notes.md gh release delete ${old} -y echo -e "\n::endgroup::" + + cleaning: + needs: [new-release, build-windows, build-linux, build-mac] + if: ${{ failure() }} + runs-on: ubuntu-latest + name: Cleaning step in case of error + steps: + - name: Remove unused daily release + run: | + gh release delete ${{needs.new-release.outputs.draft-tag}} -y From beff186daaa33713e6890f754660dcaa55b5f6a6 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 16:57:30 +0200 Subject: [PATCH 07/17] It is tinitex --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ff55fdfe0..22486ac49 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -95,7 +95,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip tinytex.zip + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip tinitex.zip --clobber build-linux: needs: [new-release] @@ -170,7 +170,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz tinytex.tar.gz installer-unix.tar.gz regex.tar.gz + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz tinitex.tar.gz installer-unix.tar.gz regex.tar.gz --clobber build-mac: needs: [new-release] @@ -233,7 +233,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz tinytex.tgz + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz tinitex.tgz --clobber deploy: needs: [new-release, build-windows, build-linux, build-mac] @@ -259,7 +259,7 @@ jobs: cleaning: needs: [new-release, build-windows, build-linux, build-mac] - if: ${{ failure() }} + if: ${{ failure() || cancelled() }} runs-on: ubuntu-latest name: Cleaning step in case of error steps: From fb6be0f1278947a82baeb89bfaac1515356331cc Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 17:27:03 +0200 Subject: [PATCH 08/17] Just write in notes.md --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 22486ac49..113bb250e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -243,8 +243,8 @@ jobs: steps: - name: Create release note run: | - echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r'))." > .github/notes.md - echo "Please see https://github.com/yihui/tinytex-releases for more info." >> .github/notes.md + echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r'))." > notes.md + echo "Please see https://github.com/yihui/tinytex-releases for more info." >> notes.md - name: Publish new release run: | echo "::group::Move tag to last commit on master" @@ -253,7 +253,7 @@ jobs: echo -e "\n::endgroup::" echo "::group::undraft new and delete current release" old=$(gh release edit ${{needs.new-release.outputs.tag}} --draft=true | grep -o tag/[^/]*$ | cut -c 5-) - gh release edit ${{needs.new-release.outputs.draft-tag}} --draft=false --notes-file .github/notes.md + gh release edit ${{needs.new-release.outputs.draft-tag}} --draft=false --notes-file notes.md gh release delete ${old} -y echo -e "\n::endgroup::" From ce8e9dd23f11ffad19ac76668f18ba9b94f097d9 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 21 Apr 2022 17:28:34 +0200 Subject: [PATCH 09/17] cleaning should be after deploy --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 113bb250e..054de5d13 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -258,7 +258,7 @@ jobs: echo -e "\n::endgroup::" cleaning: - needs: [new-release, build-windows, build-linux, build-mac] + needs: [new-release, deploy] if: ${{ failure() || cancelled() }} runs-on: ubuntu-latest name: Cleaning step in case of error From 657e19b097b98faba4e26b2c53499283ac7fe331 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 22 Apr 2022 11:26:37 +0200 Subject: [PATCH 10/17] Update GH to 2.8 --- .github/workflows/build.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 054de5d13..de113c888 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,6 +26,11 @@ jobs: url=$(gh -R cderv/tinytex-releases release create ${tag} --draft --prerelease --title "TinyTeX daily build" --notes "(WIP) Next daily release") echo "::set-output name=draft-tag::$(echo $url | grep -o tag/[^/]*$ | cut -c 5-)" echo "::set-output name=tag::${tag}" + + - name: Update GH to get 2.8 needed for gh release edit + run: | + gh release download -R cli/cli --pattern '*linux_amd64.deb' + sudo dpkg -i $(ls *.deb) build-windows: needs: [new-release] From 79a6efc94ed5da4ac1080c45e30f412dbe7b7746 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 22 Apr 2022 11:48:23 +0200 Subject: [PATCH 11/17] updated gh must be done in last job --- .github/workflows/build.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index de113c888..0d9f3e341 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,11 +27,6 @@ jobs: echo "::set-output name=draft-tag::$(echo $url | grep -o tag/[^/]*$ | cut -c 5-)" echo "::set-output name=tag::${tag}" - - name: Update GH to get 2.8 needed for gh release edit - run: | - gh release download -R cli/cli --pattern '*linux_amd64.deb' - sudo dpkg -i $(ls *.deb) - build-windows: needs: [new-release] runs-on: windows-latest @@ -43,7 +38,7 @@ jobs: steps: - name: Clone repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install Pandoc uses: r-lib/actions/setup-pandoc@v2 @@ -250,6 +245,12 @@ jobs: run: | echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r'))." > notes.md echo "Please see https://github.com/yihui/tinytex-releases for more info." >> notes.md + + - name: Update GH to get 2.8 needed for gh release edit + run: | + gh release download -R cli/cli --pattern '*linux_amd64.deb' + sudo dpkg -i $(ls *.deb) + - name: Publish new release run: | echo "::group::Move tag to last commit on master" From 1ea6e971dad055ae51347e70ffa46f9d7beb9338 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 22 Apr 2022 12:13:10 +0200 Subject: [PATCH 12/17] Add timezone to release note --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0d9f3e341..30b40efe8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -243,7 +243,7 @@ jobs: steps: - name: Create release note run: | - echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r'))." > notes.md + echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r %Z'))." > notes.md echo "Please see https://github.com/yihui/tinytex-releases for more info." >> notes.md - name: Update GH to get 2.8 needed for gh release edit From f5143ed4d4474def665c7c82a3e4bc7632482ea0 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 22 Apr 2022 12:31:31 +0200 Subject: [PATCH 13/17] Let's add scheme-full bundle --- .github/workflows/build.yaml | 23 +++++++++++++++++++---- tools/build-scheme-full.R | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 tools/build-scheme-full.R diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 30b40efe8..86d8f8b8e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -82,6 +82,11 @@ jobs: Rscript "tools/test-basic.R" # even more LaTeX packages Compress-Archive $Env:APPDATA\\TinyTeX TinyTeX.zip + - name: Build TinyTeX-2 (scheme-full) + run: | + RScript "tools/build-scheme-full.R" + Compress-Archive $Env:APPDATA\\TinyTeX TinyTeX-2.zip + - name: Test Installation env: TINYTEX_INSTALLER: TinyTeX-0 @@ -95,7 +100,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip tinitex.zip --clobber + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip TinyTeX-2.zip tinitex.zip --clobber build-linux: needs: [new-release] @@ -146,6 +151,11 @@ jobs: Rscript "tools/test-basic.R" tar zcf TinyTeX.tar.gz -C ~ .TinyTeX + - name: Build TinyTeX-2 (scheme-full) + run: | + RScript "tools/build-scheme-full.R" + tar zcf TinyTeX-2.tar.gz -C ~ .TinyTeX + - name: Export Regex file run: | Rscript "tools/export-regex.R" @@ -170,7 +180,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz tinitex.tar.gz installer-unix.tar.gz regex.tar.gz --clobber + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz TinyTeX-2.tar.gz tinitex.tar.gz installer-unix.tar.gz regex.tar.gz --clobber build-mac: needs: [new-release] @@ -221,6 +231,11 @@ jobs: Rscript "tools/test-basic.R" tar zcf TinyTeX.tgz -C ~/Library TinyTeX + - name: Build TinyTeX-2 (scheme-full) + run: | + RScript "tools/build-scheme-full.R" + tar zcf TinyTeX-2.tgz -C ~/Library TinyTeX + - name: Test Installation env: TINYTEX_INSTALLER: TinyTeX-0 @@ -233,7 +248,7 @@ jobs: - name: Upload bundles run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz tinitex.tgz --clobber + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz TinyTeX-2.tgz tinitex.tgz --clobber deploy: needs: [new-release, build-windows, build-linux, build-mac] @@ -250,7 +265,7 @@ jobs: run: | gh release download -R cli/cli --pattern '*linux_amd64.deb' sudo dpkg -i $(ls *.deb) - + - name: Publish new release run: | echo "::group::Move tag to last commit on master" diff --git a/tools/build-scheme-full.R b/tools/build-scheme-full.R new file mode 100644 index 000000000..0a5cc72a5 --- /dev/null +++ b/tools/build-scheme-full.R @@ -0,0 +1,2 @@ +tinytex::tlmgr_install('scheme-full') +sys.source('tools/clean-tlpdb.R') \ No newline at end of file From 9ef1555a8cd007f321469f4266111fb1986373b8 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 22 Apr 2022 12:40:25 +0200 Subject: [PATCH 14/17] RScript -> Rscript --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 86d8f8b8e..aad982db3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -84,7 +84,7 @@ jobs: - name: Build TinyTeX-2 (scheme-full) run: | - RScript "tools/build-scheme-full.R" + Rscript "tools/build-scheme-full.R" Compress-Archive $Env:APPDATA\\TinyTeX TinyTeX-2.zip - name: Test Installation @@ -153,7 +153,7 @@ jobs: - name: Build TinyTeX-2 (scheme-full) run: | - RScript "tools/build-scheme-full.R" + Rscript "tools/build-scheme-full.R" tar zcf TinyTeX-2.tar.gz -C ~ .TinyTeX - name: Export Regex file @@ -233,7 +233,7 @@ jobs: - name: Build TinyTeX-2 (scheme-full) run: | - RScript "tools/build-scheme-full.R" + Rscript "tools/build-scheme-full.R" tar zcf TinyTeX-2.tgz -C ~/Library TinyTeX - name: Test Installation From c0a7d6391609601ab0ec4742160200653db17f26 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 22 Apr 2022 18:15:39 +0200 Subject: [PATCH 15/17] Use a retry action to prevent issue with gh release upload that would make all the build time wasted --- .github/workflows/build.yaml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index aad982db3..713e95e9b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -99,8 +99,13 @@ jobs: - run: dir . - name: Upload bundles - run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip TinyTeX-2.zip tinitex.zip --clobber + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 5 + retry_wait_seconds: 10 + command: | + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.zip TinyTeX-1.zip TinyTeX.zip TinyTeX-2.zip tinitex.zip --clobber build-linux: needs: [new-release] @@ -179,8 +184,13 @@ jobs: - run: ls -lisa - name: Upload bundles - run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz TinyTeX-2.tar.gz tinitex.tar.gz installer-unix.tar.gz regex.tar.gz --clobber + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 5 + retry_wait_seconds: 10 + command: | + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tar.gz TinyTeX-1.tar.gz TinyTeX.tar.gz TinyTeX-2.tar.gz tinitex.tar.gz installer-unix.tar.gz regex.tar.gz --clobber build-mac: needs: [new-release] @@ -247,8 +257,13 @@ jobs: - run: ls -lisa - name: Upload bundles - run: | - gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz TinyTeX-2.tgz tinitex.tgz --clobber + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 5 + retry_wait_seconds: 10 + command: | + gh release upload ${{needs.new-release.outputs.draft-tag}} TinyTeX-0.tgz TinyTeX-1.tgz TinyTeX.tgz TinyTeX-2.tgz tinitex.tgz --clobber deploy: needs: [new-release, build-windows, build-linux, build-mac] From 8d09ca254b347bd02d5ba7b907897c846ca99584 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Mon, 25 Apr 2022 11:31:58 +0200 Subject: [PATCH 16/17] Add some comments --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 713e95e9b..fda90b1d1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -51,7 +51,6 @@ jobs: r-version: release use-public-rspm: true - # do we want to install CRAN tinytex or dev tinytex ? - name: Install tinytex package and its deps uses: r-lib/actions/setup-r-dependencies@v2 with: @@ -184,6 +183,8 @@ jobs: - run: ls -lisa - name: Upload bundles + # this specific action is used at some issues have been observe with gh while uploading assets + # This allows to not fail the workflow on upload, but retry a few time uses: nick-fields/retry@v2 with: timeout_minutes: 5 @@ -276,6 +277,7 @@ jobs: echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r %Z'))." > notes.md echo "Please see https://github.com/yihui/tinytex-releases for more info." >> notes.md + # TODO: Remove when version 2.8 will be available on GHA - name: Update GH to get 2.8 needed for gh release edit run: | gh release download -R cli/cli --pattern '*linux_amd64.deb' From 40fcc89833e73fa0b3a6241ab0d3e157c7570db1 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Mon, 25 Apr 2022 12:00:03 +0200 Subject: [PATCH 17/17] Prepare for release --- .github/workflows/build.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fda90b1d1..447960230 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,14 +1,16 @@ on: workflow_dispatch: - #schedule: - # - cron: '5 4 * * *' + schedule: + - cron: '5 3 * * *' name: Build TinyTeX Bundles env: # for gh usage with external repo GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} - GH_REPO: cderv/tinytex-releases + # required for GH to run on another repo (-R option) + # https://cli.github.com/manual/gh_help_environment + GH_REPO: yihui/tinytex-releases jobs: new-release: @@ -23,7 +25,7 @@ jobs: id: draft run: | tag=daily - url=$(gh -R cderv/tinytex-releases release create ${tag} --draft --prerelease --title "TinyTeX daily build" --notes "(WIP) Next daily release") + url=$(gh release create ${tag} --draft --prerelease --title "TinyTeX daily build" --notes "(WIP) Next daily release") echo "::set-output name=draft-tag::$(echo $url | grep -o tag/[^/]*$ | cut -c 5-)" echo "::set-output name=tag::${tag}"