Build and Release macOS Executable #8
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 macOS Executable | |
on: | |
workflow_dispatch: | |
inputs: | |
release_tag: | |
description: 'Release tag name' | |
required: true | |
jobs: | |
build-and-release: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install PyInstaller | |
run: python -m pip install pyinstaller | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Build executable | |
run: | | |
find . -name "*.json" -type f -delete | |
pyinstaller --onefile --add-data 'csab:csab' --add-data 'josaa:josaa' --exclude-module _tkinter tool.py | |
mv dist/tool jcounsellor | |
- name: Create release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.TOKEN }} | |
automatic_release_tag: ${{ github.event.inputs.release_tag }} | |
prerelease: false | |
title: JEECounsellor (macOS) - ${{ github.event.inputs.release_tag }} | |
files: | | |
jcounsellor | |