v3.0.1 #31
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: Python application | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: write | |
discussions: write | |
jobs: | |
windows-build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install pyinstaller | |
- name: Package app with pyinstaller | |
run: | | |
python -c "with open('smassh.py', 'w') as f: f.write('from smassh.__main__ import main\nmain()\n')" | |
pyinstaller -F smassh.py --add-data="smassh/assets/languages/:smassh/assets/languages" --add-data="smassh/ui/css/:smassh/ui/css" | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: smassh-windows | |
path: ./dist/smassh.exe | |
- name: Rename final file | |
run: cp ./dist/smassh.exe ./dist/windows-smassh.exe | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ./dist/windows-smassh.exe | |
linux-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install pyinstaller | |
- name: Package app with pyinstaller | |
run: | | |
python -c "with open('smassh.py', 'w') as f: f.write('from smassh.__main__ import main\nmain()\n')" | |
pyinstaller -F smassh.py --add-data="smassh/assets/languages/:smassh/assets/languages" --add-data="smassh/ui/css/:smassh/ui/css" | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: smassh-linux | |
path: ./dist/smassh | |
- name: Rename final file | |
run: cp ./dist/smassh ./dist/linux-smassh | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ./dist/linux-smassh | |
macOS-build: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install pyinstaller | |
- name: Package app with pyinstaller | |
run: | | |
python -c "with open('smassh.py', 'w') as f: f.write('from smassh.__main__ import main\nmain()\n')" | |
pyinstaller -F smassh.py --add-data="smassh/assets/languages/:smassh/assets/languages" --add-data="smassh/ui/css/:smassh/ui/css" | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: smassh-macos | |
path: ./dist/smassh | |
- name: Rename final file | |
run: cp ./dist/smassh ./dist/macos-smassh | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ./dist/macos-smassh | |