From ee783feb68929d702f2aeb429e928f883d71c444 Mon Sep 17 00:00:00 2001 From: smter Date: Wed, 10 Apr 2024 15:16:36 +0800 Subject: [PATCH 01/12] =?UTF-8?q?fix:=20=E5=B0=9D=E8=AF=95=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC=E9=87=8CDOWNLOAD?= =?UTF-8?q?=5FURL=E8=8E=B7=E5=8F=96=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 70 ++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08edb53..1a6433d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,38 +9,38 @@ jobs: runs-on: ubuntu-latest container: archlinux:latest steps: - - name: Install dependencies - run: pacman -Syu --noconfirm git fontforge curl p7zip jq - - uses: actions/checkout@v2 - - name: Grab latest version - run: | - curl -L https://api.github.com/repos/be5invis/Sarasa-Gothic/releases/latest -o api.json - UPSTREAM_VERSION=$(cat api.json | jq -r .tag_name) - DOWNLOAD_URL=$(cat api.json | jq -r '.assets[] | select(.name | test("sarasa-gothic-ttc-(?!unhinted)")) | .browser_download_url') - echo "UPSTREAM_VERSION=$UPSTREAM_VERSION" >> $GITHUB_ENV - echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV - - name: Download font - run: curl -Lvo /tmp/ttc.7z $DOWNLOAD_URL - - name: Extract font - run: 7z x -odata /tmp/ttc.7z - - name: Run script - run: | - mkdir out - python3 extract.py - - name: Compress font - run: | - cd out - 7z a ../out.zip * - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: out - path: out - - name: Upload release - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "upstream-${{ env.UPSTREAM_VERSION }}" - prerelease: true - title: Nightly build - files: out.zip + - name: Install dependencies + run: pacman -Syu --noconfirm git fontforge curl p7zip jq + - uses: actions/checkout@v2 + - name: Grab latest version + run: | + curl -L https://api.github.com/repos/be5invis/Sarasa-Gothic/releases/latest -o api.json + UPSTREAM_VERSION=$(cat api.json | jq -r .tag_name) + DOWNLOAD_URL=$(cat api.json | jq -r '.assets[] | select(.name | test("Sarasa-TTC-(?!Unhinted)")) | select(.content_type|test("application/x-compressed")) | .browser_download_url') + echo "UPSTREAM_VERSION=$UPSTREAM_VERSION" >> $GITHUB_ENV + echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV + - name: Download font + run: curl -Lvo /tmp/ttc.7z $DOWNLOAD_URL + - name: Extract font + run: 7z x -odata /tmp/ttc.7z + - name: Run script + run: | + mkdir out + python3 extract.py + - name: Compress font + run: | + cd out + 7z a ../out.zip * + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: out + path: out + - name: Upload release + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "upstream-${{ env.UPSTREAM_VERSION }}" + prerelease: true + title: Nightly build + files: out.zip From 0fb0a5d8160a340e551ffdb8dc3dce8b9e8709b2 Mon Sep 17 00:00:00 2001 From: smter Date: Wed, 10 Apr 2024 15:28:44 +0800 Subject: [PATCH 02/12] Update build.yml --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a6433d..5191cf6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,6 @@ name: build msyh on: - push: - schedule: - - cron: '0 0 * * *' + workflow_dispatch jobs: build: From f0b989fa44f016a0938c4543611fa544fc7717ed Mon Sep 17 00:00:00 2001 From: smter Date: Wed, 10 Apr 2024 16:02:51 +0800 Subject: [PATCH 03/12] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5191cf6..4e74a18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: - name: Compress font run: | cd out - 7z a ../out.zip * + 7z a ../out.7z * - name: Upload artifact uses: actions/upload-artifact@v2 with: From 90551f3be0265ab4600b9ea4a8ea6a4e6ef38126 Mon Sep 17 00:00:00 2001 From: smter Date: Wed, 10 Apr 2024 16:23:51 +0800 Subject: [PATCH 04/12] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e74a18..5ee72e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,4 +41,4 @@ jobs: automatic_release_tag: "upstream-${{ env.UPSTREAM_VERSION }}" prerelease: true title: Nightly build - files: out.zip + files: out.7z From ad09a1067318d5c2814c8ab70ef5f0ef5fb49bf9 Mon Sep 17 00:00:00 2001 From: smter Date: Fri, 12 Apr 2024 10:26:37 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E6=8F=90=E9=AB=98=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ee72e7..a6fd25b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: - name: Compress font run: | cd out - 7z a ../out.7z * + 7z a ../out.7z * -mx=9 - name: Upload artifact uses: actions/upload-artifact@v2 with: From 70c6868a1d0eb5f9bf5444a35724a8efbec0c72b Mon Sep 17 00:00:00 2001 From: smter Date: Fri, 12 Apr 2024 10:52:16 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E7=9B=B4=E6=8E=A5ubunt?= =?UTF-8?q?u=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a6fd25b..ebb0277 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,10 +5,9 @@ on: jobs: build: runs-on: ubuntu-latest - container: archlinux:latest steps: - name: Install dependencies - run: pacman -Syu --noconfirm git fontforge curl p7zip jq + run: sudo apt install git fontforge curl p7zip-full jq - uses: actions/checkout@v2 - name: Grab latest version run: | From 6352ba472a0edfc53de60aab21e79a876ea2d245 Mon Sep 17 00:00:00 2001 From: smter Date: Fri, 12 Apr 2024 10:55:12 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ebb0277..d4c1ecd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install dependencies - run: sudo apt install git fontforge curl p7zip-full jq + run: sudo apt install git fontforge curl p7zip-full jq python3 python3-fontforge - uses: actions/checkout@v2 - name: Grab latest version run: | From 73c7e39e3aa1c7c39b3027ac6bb3d9e8d6be270d Mon Sep 17 00:00:00 2001 From: smter Date: Fri, 12 Apr 2024 11:12:47 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E6=8D=A2=E5=9B=9E=E5=AE=9A=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4c1ecd..d9ac8cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,8 @@ name: build msyh on: - workflow_dispatch + push: + schedule: + - cron: '0 0 * * *' jobs: build: From 7188bcf0d766c5ef98bf98ae68920fef1b322ce0 Mon Sep 17 00:00:00 2001 From: smter Date: Wed, 11 Dec 2024 08:12:58 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B0actions/upload?= =?UTF-8?q?-artifact@v4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2已经弃用 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9ac8cd..70140bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: cd out 7z a ../out.7z * -mx=9 - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: out path: out From fc776381c220912ae4c28cf5457712a2d9d19d19 Mon Sep 17 00:00:00 2001 From: smter Date: Wed, 11 Dec 2024 08:22:38 +0800 Subject: [PATCH 10/12] Update build.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更高的压缩参数 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70140bd..35ca4f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: Compress font run: | cd out - 7z a ../out.7z * -mx=9 + 7z a ../out.7z * -mx=9 -md=512m -ms=on - name: Upload artifact uses: actions/upload-artifact@v4 with: From 813916924d70c28d6438fb92a7fe8b3d88f2819c Mon Sep 17 00:00:00 2001 From: smter Date: Fri, 10 Jan 2025 14:46:34 +0800 Subject: [PATCH 11/12] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 35ca4f7..e09a325 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install dependencies run: sudo apt install git fontforge curl p7zip-full jq python3 python3-fontforge From 9c35589d5106a2f8c0b4aa696fc1a837333912f6 Mon Sep 17 00:00:00 2001 From: smter Date: Fri, 17 Jan 2025 16:07:34 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Light=E5=AD=97=E5=BD=A2?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E4=B8=8D=E7=AC=A6=E5=90=88=E8=A6=81=E6=B1=82?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extract.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extract.py b/extract.py index 0688b16..2d4a439 100644 --- a/extract.py +++ b/extract.py @@ -26,6 +26,9 @@ def edit(self): if self.variant == "Regular": enus = enusr zhcn = zhcnr + if self.variant == "ExtraLight": + enus = enusr + " " + "Light" + zhcn = zhcnr + " " + "Light" # self.font.fullname = enus self.font.fontname = enus.replace(" ", "") self.font.fullname = enus @@ -92,4 +95,4 @@ def transformVariant(input): for ttc in listTtc("data/*.ttc"): print(ttc) - ttc.build() \ No newline at end of file + ttc.build()