diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-11 09:02:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-11 09:02:41 +0200 |
commit | ac8ee9f981ea509c04ce64d70a47429a1207e18e (patch) | |
tree | 8d7b3421af32ead8ee31f70a00ddd6fa14c81afd /.github/workflows/build.yml | |
parent | cd948dceaed4625e7a876f680d3dc028e6cfe6de (diff) | |
parent | eae8a2914e99f6e9a6db042a0bc0f984fd890227 (diff) | |
download | PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.tar.gz PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.tar.bz2 PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.zip |
Merge pull request #479 from kthchew/feature/sparkle-mac
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r-- | .github/workflows/build.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b8e5365..fbbc1417 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,10 @@ on: description: Type of build (Debug, Release, RelWithDebInfo, MinSizeRel) type: string default: Debug + secrets: + SPARKLE_ED25519_KEY: + description: Private key for signing Sparkle updates + required: false jobs: build: @@ -219,6 +223,25 @@ 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 + ### Artifact Information :information_source: + - :memo: Sparkle Signature (ed25519): \`$signature\` + EOF + else + cat >> $GITHUB_STEP_SUMMARY << EOF + ### Artifact Information :information_source: + - :warning: Sparkle Signature (ed25519): No private key available (likely a pull request or fork) + EOF + fi + - name: Package (Windows) if: runner.os == 'Windows' shell: msys2 {0} |