From ecc95f9e2acb2e73b6adc7b2f8bba2c191a31207 Mon Sep 17 00:00:00 2001 From: kosette <35268640+Kosette@users.noreply.github.com> Date: Tue, 26 Mar 2024 18:52:49 +0800 Subject: [PATCH] CI: improve macos-amd64 packaging --- .github/workflows/build_release.yml | 14 ++++++---- share/macos/Info.plist | 40 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 share/macos/Info.plist diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 047a6654..9232e4a1 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -98,7 +98,7 @@ jobs: rustup target add ${{matrix.target}} cargo build --release --locked --target ${{matrix.target}} mkdir artifact - cp target/${{matrix.target}}/release/${{matrix.artifact}} artifact/tsukimi-${{matrix.arch}}${{matrix.ext}} + cp target/${{matrix.target}}/release/${{matrix.artifact}} artifact/ cd artifact/ tar -czf tsukimi-${{matrix.arch}}.tar.gz ./* @@ -124,6 +124,14 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 + - name: Package MacOS x86_64 + run: | + tar -xzf tsukimi-x86_64-apple-darwin/tsukimi-x86_64-apple-darwin.tar.gz + mkdir -p tsukimi.app/Contents/MacOS + cp share/macos/Info.plist tsukimi.app/Contents/ + mv tsukimi tsukimi.app/Contents/MacOS/ + tar -czf tsukimi-x86_64-apple-darwin.tar.gz tsukimi.app/ + - name: Package Windows GNU run: | mv tsukimi-x86_64-windows-gnu/*.zip . @@ -136,10 +144,6 @@ jobs: run: | mv tsukimi-x86_64-linux-gnu/*.tar.gz . - - name: Package MacOS x86_64 - run: | - mv tsukimi-x86_64-apple-darwin/*.tar.gz . - - name: Calculate hash run: | sha512sum *.zip > tsukimi.sha512sum diff --git a/share/macos/Info.plist b/share/macos/Info.plist new file mode 100644 index 00000000..f03f45f7 --- /dev/null +++ b/share/macos/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleName + Tsukimi + CFBundleDisplayName + Tsukimi + CFBundleIdentifier + com.inhana.tsukimi + CFBundleExecutable + tsukimi + CFBundleSignature + suki + + LSMinimumSystemVersion + 12.7.3 + + CFBundleVersion + 0.0.3 + CFBundleShortVersionString + 0.0.3 + CFBundlePackageType + APPL + + CFBundleURLTypes + + + CFBundleURLName + tsukimi + CFBundleTypeRole + Viewer + CFBundleURLSchemes + + tsukimi + + + + +