mirror of https://github.com/OpenTTD/OpenTTD.git
Feature: [Actions] Create .zip for macOS build
This commit is contained in:
parent
3dac139b00
commit
1187dc3217
|
@ -496,6 +496,29 @@ jobs:
|
||||||
cd build-x64
|
cd build-x64
|
||||||
../os/macosx/notarize.sh
|
../os/macosx/notarize.sh
|
||||||
|
|
||||||
|
- name: Build zip
|
||||||
|
run: |
|
||||||
|
cd build-x64
|
||||||
|
|
||||||
|
pushd _CPack_Packages/*/Bundle/openttd-*/
|
||||||
|
|
||||||
|
# Remove the Applications symlink from the staging folder
|
||||||
|
rm -f Applications
|
||||||
|
|
||||||
|
# Remove the original dmg built by CPack to avoid a conflict when resolving
|
||||||
|
# the zip_filename variable below
|
||||||
|
rm -f ../*.dmg
|
||||||
|
|
||||||
|
zip_filename=(../openttd-*)
|
||||||
|
|
||||||
|
# Package up the existing, notarised .app into a zip file
|
||||||
|
zip -r -9 ${zip_filename}.zip OpenTTD.app
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Now move it into place to be uploaded
|
||||||
|
mv _CPack_Packages/*/Bundle/openttd-*.zip bundles/
|
||||||
|
|
||||||
- name: Store bundles
|
- name: Store bundles
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -56,3 +56,13 @@ cat <<EOF > notarize.json
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
gon notarize.json
|
gon notarize.json
|
||||||
|
|
||||||
|
app_filename=(_CPack_Packages/*/Bundle/openttd-*/OpenTTD.app)
|
||||||
|
|
||||||
|
if [ "${app_filename}" = "_CPack_Packages/*/Bundle/openttd-*/OpenTTD.app" ]; then
|
||||||
|
echo "No .app found in the _CPack_Packages directory, skipping stapling."
|
||||||
|
exit 0
|
||||||
|
fi;
|
||||||
|
|
||||||
|
# Now staple the ticket to the .app
|
||||||
|
xcrun stapler staple "${app_filename[0]}"
|
||||||
|
|
Loading…
Reference in New Issue