mirror of
https://github.com/meshtastic/python.git
synced 2025-12-30 11:27:53 -05:00
91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
name: Build and publish standalone executables
|
|
|
|
on: workflow_dispatch
|
|
|
|
jobs:
|
|
|
|
build-and-publish-mac:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Setup code signing
|
|
env:
|
|
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
|
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
|
MACOS_KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
|
|
run: |
|
|
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
|
|
security create-keychain -p "$MACOS_KEYCHAIN_PASSWORD" meshtastic.keychain
|
|
security default-keychain -s meshtastic.keychain
|
|
security unlock-keychain -p "$MACOS_KEYCHAIN_PASSWORD" meshtastic.keychain
|
|
security import certificate.p12 -k meshtastic.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_KEYCHAIN_PASSWORD" meshtastic.keychain
|
|
|
|
- name: Build
|
|
env:
|
|
MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
|
|
run: |
|
|
pip install pyinstaller
|
|
pip install -r requirements.txt
|
|
pip install .
|
|
pyinstaller -F -n meshtastic --collect-all meshtastic --codesign-identity "$MACOS_SIGNING_IDENTITY" meshtastic/__main__.py
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshtastic_mac
|
|
path: dist
|
|
|
|
build-and-publish-ubuntu:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Build
|
|
run: |
|
|
pip install pyinstaller
|
|
pip install -r requirements.txt
|
|
pip install .
|
|
pyinstaller -F -n meshtastic --collect-all meshtastic meshtastic/__main__.py
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshtastic_ubuntu
|
|
path: dist
|
|
|
|
|
|
build-and-publish-windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Build
|
|
run: |
|
|
pip install pyinstaller
|
|
pip install -r requirements.txt
|
|
pip install .
|
|
pyinstaller -F -n meshtastic --collect-all meshtastic meshtastic/__main__.py
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshtastic_windows
|
|
path: dist
|