-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
107 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: macOS | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build_app: | ||
name: Build macOS application bundle | ||
runs-on: macos-13 | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install the Apple certificate and provisioning profile | ||
env: | ||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | ||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | ||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | ||
DEV_ID: ${{ secrets.DEV_ID }} | ||
DEV_USERNAME: ${{ secrets.NOTARIZE_USERNAME }} | ||
DEV_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }} | ||
run: | | ||
# create variables | ||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | ||
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision | ||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | ||
# import certificate and provisioning profile from secrets | ||
touch $CERTIFICATE_PATH | ||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 -d -o $CERTIFICATE_PATH | ||
# create temporary keychain | ||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | ||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||
# import certificate to keychain | ||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | ||
security list-keychain -d user -s $KEYCHAIN_PATH | ||
# Create config file needed by release.py | ||
echo "IDENTITY=$DEV_ID" >> macOS/IDs.sh | ||
echo "USERNAME=$DEV_USERNAME" >> macOS/IDs.sh | ||
echo "PASSWORD=$DEV_PASSWORD" >> macOS/IDs.sh | ||
- name: install bundle-app | ||
run: | | ||
python3.11 -m pip install bundle-app | ||
- name: assemble bundle | ||
run: | | ||
python3.11 build-mac-app.py | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: SnapPy.dmg | ||
path: ./macOS/dmg-maker/SnapPy.dmg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.pyc | ||
__pycache__ | ||
*.tgz | ||
*.dmg | ||
dist | ||
IDs.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import sys | ||
import os | ||
from shutil import rmtree | ||
from subprocess import check_call | ||
|
||
os.chdir('macOS') | ||
app = os.path.join('snappy', 'SnapPy.app') | ||
if os.path.exists(app): | ||
rmtree(app) | ||
check_call([sys.executable, 'bin/make-bundle.py']) | ||
check_call(['/bin/bash', 'bin/sign-bundle.sh']) | ||
if os.path.exists('dist'): | ||
rmtree('dist') | ||
os.renames('snappy/SnapPy.app', 'dist/SnapPy.app') | ||
check_call(['/bin/bash', 'bin/notarize.sh']) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import sys | ||
import os | ||
import subprocess | ||
|
||
os.chdir('snappy') | ||
subprocess.check_call([sys.executable, '-m', 'bundle_app.build']) | ||
subprocess.check_call([sys.executable, '-m', 'bundle_app.add_packages']) | ||
subprocess.check_call([sys.executable, '-m', 'bundle_app.streamline']) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
snappy | ||
snappy >=3.1.1 | ||
snappy-15-knots |