-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.79 KB
/
build-exe-and-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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='${{ 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: 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 }}