Skip to content

Commit

Permalink
CI: improve macos-amd64 packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosette committed Mar 26, 2024
1 parent a971d2f commit ecc95f9
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./*
Expand All @@ -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 .
Expand All @@ -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
Expand Down
40 changes: 40 additions & 0 deletions share/macos/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>Tsukimi</string>
<key>CFBundleDisplayName</key>
<string>Tsukimi</string>
<key>CFBundleIdentifier</key>
<string>com.inhana.tsukimi</string>
<key>CFBundleExecutable</key>
<string>tsukimi</string>
<key>CFBundleSignature</key>
<string>suki</string>

<key>LSMinimumSystemVersion</key>
<string>12.7.3</string>

<key>CFBundleVersion</key>
<string>0.0.3</string>
<key>CFBundleShortVersionString</key>
<string>0.0.3</string>
<key>CFBundlePackageType</key>
<string>APPL</string>

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>tsukimi</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleURLSchemes</key>
<array>
<string>tsukimi</string>
</array>
</dict>
</array>
</dict>
</plist>

0 comments on commit ecc95f9

Please sign in to comment.