Skip to content

Day 5 (part 1, 2)

Day 5 (part 1, 2) #19

Workflow file for this run

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 Pillow
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/"