From fa7f18bc443d7638dd0c14292dd11e111502d950 Mon Sep 17 00:00:00 2001 From: msoxzw <56633971+msoxzw@users.noreply.github.com> Date: Fri, 24 Jun 2022 21:06:03 +0000 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..134f8fc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Create Release + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: macos-${{ github.ref_name }} + steps: + - name: Download + run: | + import plistlib + import subprocess + with open('/System/Library/AssetsV2/com_apple_MobileAsset_Font7/com_apple_MobileAsset_Font7.xml', 'rb') as fp: + urls = [asset['__BaseURL'] + asset['__RelativePath'] for asset in plistlib.load(fp)['Assets'] + if asset['_CompatibilityVersion'] == 1 and asset.get('__InstallWithOS')] + args = ['curl', '--fail', '--fail-early', '--no-progress-meter', '--remote-name-all', '--retry', '5'] + urls + subprocess.run(args, check=True) + shell: python3 {0} + + - name: Archive + run: | + unzip '*.zip' 'AssetData/*' + zstd -19 -r --output-dir-flat AssetData AssetData /System/Library/Fonts + shell: bash + + - name: Release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + artifactErrorsFailBuild: true + artifacts: AssetData/*.zst + artifactContentType: application/zstd + name: Fonts included with macOS ${{ github.ref_name }}