Build and Release v1.3.2 #4
Workflow file for this run
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: Build and Release with PyInstaller | |
run-name: Build and Release ${{ github.event.release.tag_name }} | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
artifact_name: timetracker_ubuntu | |
- os: windows-latest | |
artifact_name: timetracker_win.exe | |
- os: macos-latest | |
artifact_name: timetracker_mac | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
pip install pyinstaller | |
- name: Build | |
run: | | |
pyinstaller --onefile -w --name ${{ matrix.artifact_name }} --icon="ui/clock.png" --hidden-import="holidays.countries" runme.py | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact_name }} | |
path: dist/${{ matrix.artifact_name }} | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.artifact_name }} | |
tag: ${{ github.event.release.tag_name }} |