Github Actions: Package macOS app

This commit is contained in:
Philipp Wolfer
2019-11-25 16:58:44 +01:00
parent 94fa88266b
commit 1ce769983f
2 changed files with 37 additions and 3 deletions

32
.github/workflows/package-macos.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Package for macOS
on: [push]
jobs:
package:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Setup macOS build environment
run: |
./scripts/package/macos-setup.sh
env:
DISCID_VERSION: 0.6.2
FPCALC_VERSION: 1.4.3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
source bin/activate
pip install -r requirements-macos.txt
- name: Build macOS app
run: |
source bin/activate
./scripts/package/macos-package-app.sh
env:
UPLOAD_OSX: 1

View File

@@ -7,9 +7,11 @@ brew install gettext
brew link gettext --force
# Install requested Python version
wget "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg"
sudo installer -pkg python-${PYTHON_VERSION}-macosx10.9.pkg -target /
sudo python3 -m ensurepip
if [ -n "$PYTHON_VERSION" ]; then
wget "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg"
sudo installer -pkg python-${PYTHON_VERSION}-macosx10.9.pkg -target /
sudo python3 -m ensurepip
fi
# Install libdiscid
wget "ftp://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/libdiscid-$DISCID_VERSION.tar.gz"