Build Windows Executable #91
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 Windows Executable | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install pyinstaller | |
- name: Get version number | |
id: get_version | |
run: echo "version=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Build executable | |
run: pyinstaller --name=mmrelay.exe --onefile --console main.py | |
- name: Build installer | |
uses: nadeemjazmawe/[email protected] | |
with: | |
filepath: "/DAppVersion=${{ env.version }} ./mmrelay.iss" | |
- name: Rename installer for release | |
run: ren MMRelay_setup.exe MMRelay_setup_${{ env.version }}.exe | |
- name: Upload setup.exe to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: MMRelay_setup_${{ env.version }}.exe | |
asset_name: MMRelay_setup_${{ env.version }}.exe | |
tag: ${{ github.ref }} | |
overwrite: true |