Skip to content

Commit

Permalink
revert some 8.2 changes, trying to get CI happy
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-goode committed Mar 21, 2024
1 parent 6389467 commit ebd83b6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 88 deletions.
67 changes: 6 additions & 61 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,8 @@ on:
WINDOWS_CODESIGN_PASSWORD:
description: Password for signing Windows builds
required: false
APPLE_CODESIGN_CERT:
description: Certificate for signing macOS builds
required: false
APPLE_CODESIGN_PASSWORD:
description: Password for signing macOS builds
required: false
APPLE_CODESIGN_ID:
description: Certificate ID for signing macOS builds
required: false
APPLE_NOTARIZE_APPLE_ID:
description: Apple ID used for notarizing macOS builds
required: false
APPLE_NOTARIZE_TEAM_ID:
description: Team ID used for notarizing macOS builds
required: false
APPLE_NOTARIZE_PASSWORD:
description: Password used for notarizing macOS builds
CACHIX_AUTH_TOKEN:
description: Private token for authenticating against Cachix cache
required: false
GPG_PRIVATE_KEY:
description: Private key for AppImage signing
Expand Down Expand Up @@ -351,63 +336,23 @@ jobs:
# PACKAGE BUILDS
##

- name: Fetch codesign certificate (macOS)
if: runner.os == 'macOS'
run: |
echo '${{ secrets.APPLE_CODESIGN_CERT }}' | base64 --decode > codesign.p12
if [ -n '${{ secrets.APPLE_CODESIGN_ID }}' ]; then
security create-keychain -p '${{ secrets.APPLE_CODESIGN_PASSWORD }}' build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p '${{ secrets.APPLE_CODESIGN_PASSWORD }}' build.keychain
security import codesign.p12 -k build.keychain -P '${{ secrets.APPLE_CODESIGN_PASSWORD }}' -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k '${{ secrets.APPLE_CODESIGN_PASSWORD }}' build.keychain
else
echo ":warning: Using ad-hoc code signing for macOS, as certificate was not present." >> $GITHUB_STEP_SUMMARY
fi
- name: Package (macOS)
if: runner.os == 'macOS'
run: |
cmake --install ${{ env.BUILD_DIR }}
cd ${{ env.INSTALL_DIR }}
chmod +x "PollyMC.app/Contents/MacOS/pollymc"
if [ -n '${{ secrets.APPLE_CODESIGN_ID }}' ]; then
APPLE_CODESIGN_ID='${{ secrets.APPLE_CODESIGN_ID }}'
else
APPLE_CODESIGN_ID='-'
fi
sudo codesign --sign "$APPLE_CODESIGN_ID" --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PollyMC.app/Contents/MacOS/pollymc"
mv "PollyMC.app" "PollyMC.app"
- name: Notarize (macOS)
if: runner.os == 'macOS'
run: |
cd ${{ env.INSTALL_DIR }}
if [ -n '${{ secrets.APPLE_NOTARIZE_PASSWORD }}' ]; then
ditto -c -k --sequesterRsrc --keepParent "PollyMC.app" ../PollyMC.zip
xcrun notarytool submit ../PollyMC.zip \
--wait --progress \
--apple-id '${{ secrets.APPLE_NOTARIZE_APPLE_ID }}' \
--team-id '${{ secrets.APPLE_NOTARIZE_TEAM_ID }}' \
--password '${{ secrets.APPLE_NOTARIZE_PASSWORD }}'
xcrun stapler staple "PollyMC.app"
else
echo ":warning: Skipping notarization as credentials are not present." >> $GITHUB_STEP_SUMMARY
fi
ditto -c -k --sequesterRsrc --keepParent "PollyMC.app" ../PollyMC.zip
sudo codesign --sign - --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PollyMC.app/Contents/MacOS/pollymc"
tar -czf ../PollyMC.tar.gz *
- name: Make Sparkle signature (macOS)
if: matrix.name == '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 }}/PollyMC.zip -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
signature=$(/usr/local/opt/openssl@3/bin/openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/PollyMC.tar.gz -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
rm ed25519-priv.pem
cat >> $GITHUB_STEP_SUMMARY << EOF
### Artifact Information :information_source:
Expand Down Expand Up @@ -574,7 +519,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: PollyMC-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
path: PollyMC.zip
path: PollyMC.tar.gz

- name: Upload binary zip (Windows)
if: runner.os == 'Windows'
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/trigger_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ jobs:
SPARKLE_ED25519_KEY: ${{ secrets.SPARKLE_ED25519_KEY }}
WINDOWS_CODESIGN_CERT: ${{ secrets.WINDOWS_CODESIGN_CERT }}
WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
APPLE_CODESIGN_CERT: ${{ secrets.APPLE_CODESIGN_CERT }}
APPLE_CODESIGN_PASSWORD: ${{ secrets.APPLE_CODESIGN_PASSWORD }}
APPLE_CODESIGN_ID: ${{ secrets.APPLE_CODESIGN_ID }}
APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }}
APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }}
APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }}
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}
39 changes: 18 additions & 21 deletions .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
SPARKLE_ED25519_KEY: ${{ secrets.SPARKLE_ED25519_KEY }}
WINDOWS_CODESIGN_CERT: ${{ secrets.WINDOWS_CODESIGN_CERT }}
WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
APPLE_CODESIGN_CERT: ${{ secrets.APPLE_CODESIGN_CERT }}
APPLE_CODESIGN_PASSWORD: ${{ secrets.APPLE_CODESIGN_PASSWORD }}
APPLE_CODESIGN_ID: ${{ secrets.APPLE_CODESIGN_ID }}
APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }}
APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }}
APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }}
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}

Expand All @@ -46,13 +41,14 @@ jobs:
run: |
mv ${{ github.workspace }}/PollyMC-source PollyMC-${{ env.VERSION }}
mv PollyMC-Linux-Qt6-Portable*/PollyMC-portable.tar.gz PollyMC-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
mv PollyMC-Linux-Qt6*/PollyMC.tar.gz PollyMC-Linux-Qt6-${{ env.VERSION }}.tar.gz
mv PollyMC-Linux-Qt6*/PollyMC.tar.gz PollyMC-Linux-Qt6-${{ env.VERSION }}.tar.gz
mv PollyMC-Linux-Qt5-Portable*/PollyMC-portable.tar.gz PollyMC-Linux-Qt5-Portable-${{ env.VERSION }}.tar.gz
mv PollyMC-Linux-Qt5*/PollyMC.tar.gz PollyMC-Linux-Qt5-${{ env.VERSION }}.tar.gz
mv PollyMC-*.AppImage/PollyMC-*.AppImage PollyMC-Linux-x86_64.AppImage
mv PollyMC-*.AppImage.zsync/PollyMC-*.AppImage.zsync PollyMC-Linux-x86_64.AppImage.zsync
mv PollyMC-macOS-Legacy*/PollyMC.zip PollyMC-macOS-Legacy-${{ env.VERSION }}.zip
mv PollyMC-macOS*/PollyMC.zip PollyMC-macOS-${{ env.VERSION }}.zip
mv PollyMC*.flatpak/PollyMC*.flatpak PollyMC-Linux-${{ env.VERSION }}-x86_64.flatpak
mv PollyMC-macOS-Legacy*/PollyMC.tar.gz PollyMC-macOS-Legacy-${{ env.VERSION }}.tar.gz
mv PollyMC-macOS*/PollyMC.tar.gz PollyMC-macOS-${{ env.VERSION }}.tar.gz
tar --exclude='.git' -czf PollyMC-${{ env.VERSION }}.tar.gz PollyMC-${{ env.VERSION }}
Expand Down Expand Up @@ -92,21 +88,22 @@ jobs:
draft: true
prerelease: false
files: |
PollyMC-Linux-Qt5-${{ env.VERSION }}.tar.gz
PollyMC-Linux-Qt5-Portable-${{ env.VERSION }}.tar.gz
PollyMC-Windows-MSVC-Setup-${{ env.VERSION }}.exe
PollyMC-Windows-MSVC-Portable-${{ env.VERSION }}.zip
PollyMC-Windows-MSVC-${{ env.VERSION }}.zip
PollyMC-Linux-x86_64.AppImage
PollyMC-Linux-x86_64.AppImage.zsync
PollyMC-Linux-${{ env.VERSION }}-x86_64.flatpak
PollyMC-macOS-${{ env.VERSION }}.tar.gz
PollyMC-macOS-Legacy-${{ env.VERSION }}.tar.gz
PollyMC-Linux-Qt5-${{ env.VERSION }}.tar.gz
PollyMC-Linux-Qt5-Portable-${{ env.VERSION }}.tar.gz
PollyMC-Linux-Qt6-${{ env.VERSION }}.tar.gz
PollyMC-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
PollyMC-Windows-MinGW-w64-${{ env.VERSION }}.zip
PollyMC-Windows-MinGW-w64-Portable-${{ env.VERSION }}.zip
PollyMC-Windows-MinGW-w64-Setup-${{ env.VERSION }}.exe
PollyMC-Windows-MSVC-arm64-${{ env.VERSION }}.zip
PollyMC-Windows-MSVC-arm64-Portable-${{ env.VERSION }}.zip
PollyMC-Windows-MSVC-arm64-Setup-${{ env.VERSION }}.exe
PollyMC-Windows-MSVC-${{ env.VERSION }}.zip
PollyMC-Windows-MSVC-Portable-${{ env.VERSION }}.zip
PollyMC-Windows-MSVC-Setup-${{ env.VERSION }}.exe
PollyMC-macOS-${{ env.VERSION }}.zip
PollyMC-macOS-Legacy-${{ env.VERSION }}.zip
PollyMC-Windows-MSVC-arm64-Portable-${{ env.VERSION }}.zip
PollyMC-Windows-MSVC-arm64-${{ env.VERSION }}.zip
PollyMC-Windows-MinGW-w64-Setup-${{ env.VERSION }}.exe
PollyMC-Windows-MinGW-w64-Portable-${{ env.VERSION }}.zip
PollyMC-Windows-MinGW-w64-${{ env.VERSION }}.zip
PollyMC-${{ env.VERSION }}.tar.gz

0 comments on commit ebd83b6

Please sign in to comment.