Fix mac build variants #141
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: "pre-release" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
jobs: | |
build-win: | |
name: "Build Windows" | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
architecture: [x64, x86] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
architecture: ${{ matrix.architecture }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build ${{ matrix.architecture }} with pyinstaller | |
run: | | |
pyinstaller ds-build-win-${{ matrix.architecture }}.spec | |
- name: Upload Windows binarys | |
uses: jason2866/[email protected] | |
with: | |
name: decode-status-windows-${{ matrix.architecture }} | |
path: dist/decode-status-${{ matrix.architecture }}.exe | |
build-mac: | |
name: Build for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-14, macos-12] | |
include: | |
- os: macos-14 | |
TARGET: macos-arm | |
- os: macos-12 | |
TARGET: macos | |
env: | |
DISTPATH: decode-status-${{ matrix.TARGET }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
brew install create-dmg | |
- name: Build with pyinstaller | |
run: | | |
pyinstaller ds-build-mac.spec | |
rm -Rf dist/*.app | |
create-dmg decode-status-${{ matrix.TARGET }}.dmg dist | |
- name: Upload Mac binary | |
uses: jason2866/[email protected] | |
with: | |
name: ${{ env.DISTPATH }} | |
path: /Users/runner/work/decode-status/decode-status/decode-status-${{ matrix.TARGET }}.dmg | |
release: | |
name: "Release Decode-status" | |
needs: [build-mac, build-win] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: jason2866/[email protected] | |
with: | |
name: | | |
decode-status-windows-x64 | |
decode-status-windows-x86 | |
decode-status-macos | |
decode-status-macos-arm | |
path: | | |
./output/ | |
./output/ | |
./output/ | |
./output/ | |
- name: Release | |
uses: jason2866/[email protected] | |
with: | |
tag_name: ${{ github.run_number }} | |
files: ./output/* | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |