ci: Configure windows, mac, linux builds separately #7
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: "AoC Notifier Builds" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
artifact-name: AoC-notifier-linux | |
file-separator: "/" | |
- os: windows-latest | |
artifact-name: AoC-notifier-windows | |
file-separator: "\\" | |
- os: macos-latest | |
artifact-name: AoC-notifier-macos | |
file-separator: "/" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.12" | |
- name: Install requirements | |
run: | | |
cd notifier | |
python -m pip install --upgrade pip | |
python -m pip install pyinstaller | |
python -m pip install -e . | |
- name: Build notifier (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
cd notifier | |
pyinstaller -F -w -i "aoc.ico" --clean -n "AoC" --add-data "aoc.ico;." --add-data "aoc.png;." aoc_notifier/__main__.py | |
- name: Build notifier (macOS/Linux) | |
if: runner.os != 'Windows' | |
run: | | |
cd notifier | |
pyinstaller -F -w -i "aoc.ico" --clean -n "AoC" --add-data "aoc.ico:." --add-data "aoc.png:." aoc_notifier/__main__.py | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact-name }} | |
path: "notifier/dist/" |