Version bump to v1.0.0 #23
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: Release Builder | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
# Windows Build | |
windows-build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install pyinstaller | |
- name: Run Windows Build Script | |
run: scripts\build_windows.bat | |
shell: cmd | |
- name: Upload Windows Executable to Release | |
if: github.event_name == 'release' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: dist/*.exe # Upload .exe from dist/ | |
asset_name: onthespot_windows.exe | |
asset_content_type: application/octet-stream | |
# Linux Build | |
linux-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y patchelf fuse libfuse2 wget | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install pyinstaller | |
pip install build | |
- name: Make Build Scripts Executable | |
run: | | |
chmod +x scripts/build_linux.sh | |
chmod +x scripts/build_appimage.sh | |
- name: Run Linux Build Script | |
run: scripts/build_linux.sh | |
shell: bash | |
- name: Create Linux tar.gz | |
run: | | |
cd dist | |
tar -czvf onthespot_linux.tar.gz onthespot_linux | |
- name: Upload Linux Executable to Release | |
if: github.event_name == 'release' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: dist/onthespot_linux.tar.gz # Upload .tar.gz from dist/ | |
asset_name: onthespot_linux.tar.gz | |
asset_content_type: application/gzip | |
# macOS Build | |
macos-build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
brew install pyinstaller | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Make Build Script Executable | |
run: chmod +x scripts/build_mac.sh | |
- name: Run macOS Build Script | |
run: scripts/build_mac.sh | |
shell: bash | |
- name: Upload macOS DMG to Release | |
if: github.event_name == 'release' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: dist/*.dmg # Upload .dmg from dist/ | |
asset_name: OnTheSpot.dmg | |
asset_content_type: application/x-apple-diskimage | |