fservida is packaging Gemino for deployment. #127
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
name: Packaging Gemino | |
run-name: ${{ github.actor }} is packaging Gemino for deployment. | |
on: [push, pull_request] | |
#push: | |
# branches: | |
# - master | |
# - 'releases/**' | |
#pull_request: | |
# branches: | |
# - master | |
jobs: | |
build-macos: | |
runs-on: macos-11 | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pybindgen | |
pip install -r requirements/base.txt | |
- name: Setup codesigning environment | |
env: | |
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} | |
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
MACOS_CERTIFICATE_APP_DISTRIBUTION: ${{ secrets.MACOS_CERTIFICATE_APP_DISTRIBUTION }} | |
MACOS_CERTIFICATE_APP_DISTRIBUTION_PWD: ${{ secrets.MACOS_CERTIFICATE_APP_DISTRIBUTION_PWD }} | |
MACOS_CERTIFICATE_INSTALLER_DISTRIBUTION: ${{ secrets.MACOS_CERTIFICATE_INSTALLER_DISTRIBUTION }} | |
MACOS_CERTIFICATE_INSTALLER_DISTRIBUTION_PWD: ${{ secrets.MACOS_CERTIFICATE_INSTALLER_DISTRIBUTION_PWD }} | |
KEYCHAIN_PWD: ${{ secrets.KEYCHAIN_PWD }} | |
run: | | |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 | |
security create-keychain -p $KEYCHAIN_PWD build.keychain | |
security set-keychain-settings -lut 21600 build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p $KEYCHAIN_PWD build.keychain | |
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PWD build.keychain | |
echo $MACOS_CERTIFICATE_APP_DISTRIBUTION | base64 --decode > certificate.p12 | |
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_APP_DISTRIBUTION_PWD -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PWD build.keychain | |
echo $MACOS_CERTIFICATE_INSTALLER_DISTRIBUTION | base64 --decode > certificate.p12 | |
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_INSTALLER_DISTRIBUTION_PWD -A /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PWD build.keychain | |
security find-identity -v -p codesigning | |
- name: Package app with PyInstaller and Create-DMG | |
env: | |
MACOS_NOTARIZATION_ISSUER: ${{ secrets.MACOS_NOTARIZATION_ISSUER }} | |
MACOS_NOTARIZATION_KEY: ${{ secrets.MACOS_NOTARIZATION_KEY }} | |
MACOS_NOTARIZATION_KEY_ID: ${{ secrets.MACOS_NOTARIZATION_KEY_ID }} | |
MACOS_PROVISIONING_PROFILE: ${{ secrets.MACOS_PROVISIONING_PROFILE }} | |
MACOS_ALTOOL_USER: ${{ secrets.MACOS_ALTOOL_USER }} | |
MACOS_ALTOOL_PASSWORD: ${{ secrets.MACOS_ALTOOL_PASSWORD }} | |
run: | | |
src/build/macos/build_macos.sh | |
- name: 'Upload App to App Store' | |
env: | |
MACOS_ALTOOL_USER: ${{ secrets.MACOS_ALTOOL_USER }} | |
MACOS_ALTOOL_PASSWORD: ${{ secrets.MACOS_ALTOOL_PASSWORD }} | |
run: | | |
xcrun altool --upload-app --file build/dist/gemino.pkg -u $MACOS_ALTOOL_USER -p $MACOS_ALTOOL_PASSWORD --type macos | |
- name: 'Upload DMG Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gemino.dmg | |
path: build/dist/gemino.dmg | |
if-no-files-found: error | |
- name: 'Upload PKG Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gemino.pkg | |
path: build/dist/gemino.pkg | |
if-no-files-found: error | |
build-ubuntu: | |
if: false | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: ["3.6"] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt -y install gem | |
sudo gem install fpm | |
python -m pip install --upgrade pip | |
pip install -r requirements/base.txt | |
- name: Package app with fbs | |
run: | | |
fbs freeze | |
- name: Package installer with fbs | |
run: | | |
fbs installer | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gemino.deb | |
path: target/gemino.deb | |
if-no-files-found: error | |
build-windows: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install pybindgen | |
pip install https://static.servida.ch/software/python/fastchunking/fastchunking-0.0.3-cp39-cp39-win_amd64.whl | |
pip install -r requirements/base.txt | |
- name: Package app with PyInstaller and NSIS | |
run: | | |
src\build\windows\build_windows.bat | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: geminoSetup.exe | |
path: build/dist/geminoSetup.exe | |
if-no-files-found: error | |