Skip to content

Build and Release

Build and Release #25

name: Build and Release
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='',
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: Release
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 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}