Use GitHub Actions to get signature for Sparkle
Requires a secret called `SPARKLE_ED25519_KEY`, in the format of a private key file
This commit is contained in:
parent
f3c72f4f08
commit
b1f486518e
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@ -100,7 +100,7 @@ jobs:
|
||||
run: |
|
||||
brew update
|
||||
brew install qt@5 ninja
|
||||
|
||||
|
||||
- name: Update Qt (AppImage)
|
||||
if: runner.os == 'Linux' && matrix.appimage == true
|
||||
run: |
|
||||
@ -170,6 +170,27 @@ jobs:
|
||||
sudo codesign --sign - --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PolyMC.app/Contents/MacOS/polymc"
|
||||
tar -czf ../PolyMC.tar.gz *
|
||||
|
||||
- name: Make Sparkle signature (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
if [ '${{ secrets.SPARKLE_ED25519_KEY }}' != '' ]; then
|
||||
brew install openssl@3
|
||||
echo '${{ secrets.SPARKLE_ED25519_KEY }}' > ed25519-priv.pem
|
||||
signature=$(/usr/local/opt/openssl@3/bin/openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/PolyMC.tar.gz -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
|
||||
rm ed25519-priv.pem
|
||||
cat >> $GITHUB_STEP_SUMMARY << EOF
|
||||
### Sparkle Signatures :memo:
|
||||
|
||||
- macOS Archive: $signature
|
||||
EOF
|
||||
else
|
||||
cat >> $GITHUB_STEP_SUMMARY << EOF
|
||||
### Sparkle Signatures :memo:
|
||||
|
||||
- macOS Archive: No private key available (likely a pull request or fork)
|
||||
EOF
|
||||
fi
|
||||
|
||||
- name: Package (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: msys2 {0}
|
||||
|
Loading…
Reference in New Issue
Block a user