Build and Release (test) #2
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 (test) | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag to use for this release' | |
required: true | |
description: | |
description: 'Description for this release' | |
required: false | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
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 pyinstaller | |
pip install pyinstaller-versionfile | |
pip install colorama | |
pip install Pillow | |
- name: Create version file | |
run: | | |
python -c " | |
import pyinstaller_versionfile | |
version_file_path = 'version_info.txt' | |
version = pyinstaller_versionfile.create_versionfile( | |
output_file=version_file_path, | |
version='${{ github.event.inputs.tag }}', | |
company_name='Aholicknight', | |
file_description='A save editor for the game Cruelty Squad', | |
internal_name='Cruelty Squad Save Editor', | |
original_filename='Cruelty Squad Save Editor.exe', | |
product_name='Cruelty Squad Save Editor' | |
)" | |
shell: bash | |
- name: Build exe | |
run: pyinstaller --onefile --icon=favicon.ico --name="Cruelty Squad Save Editor" --version-file=version_info.txt save-editor.py | |
- name: Test | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./dist/Cruelty Squad Save Editor.exe | |
tag_name: ${{ github.event.inputs.tag }} | |
name: Cruelty Squad Save Editor v${{ github.event.inputs.tag }} | |
body: ${{ github.event.inputs.description }} | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |