-
Notifications
You must be signed in to change notification settings - Fork 9
88 lines (74 loc) · 2.63 KB
/
release_windows_application.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Release MTFG
on:
push:
tags:
- '*'
jobs:
miniconda:
name: Miniconda ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["windows-latest"]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: python-funscript-editor
environment-file: environment_windows.yaml
python-version: 3.9
auto-activate-base: false
- name: Collect Conda Info
shell: bash -l {0}
run: |
conda info
conda env export
- name: Get Application Version
id: get_version
uses: battila7/get-version-action@v2
- name: Build Application Documentation
shell: bash -l {0}
run: |
cd docs/app
mkdocs build
cd ../..
- name: Build Application
shell: bash -l {0}
run: |
pyinstaller --add-data="funscript_editor/config/*;funscript_editor/config" --add-data="assets/*;." --hidden-import "pynput.keyboard._win32" --hidden-import "pynput.mouse._win32" --noupx --icon=icon.ico funscript-editor.py
- name: Move Documentation to Application Build Directory
shell: bash -l {0}
run: |
mv "docs/app/site" "dist/funscript-editor/funscript_editor/docs"
- name: Create OFS Files Directory
shell: bash -l {0}
run: |
mkdir -p "dist/funscript-editor/OFS"
- name: Add MTFG OFS Lua Extension
shell: bash -l {0}
run: |
cp "contrib/Installer/assets/main.lua" "dist/funscript-editor/OFS/main.lua"
- name: Add json Lua Extension
shell: bash -l {0}
run: |
cp "contrib/Installer/assets/json.lua" "dist/funscript-editor/OFS/json.lua"
- name: Add Version to Build
shell: bash -l {0}
run: |
echo "${{ steps.get_version.outputs.version }}" > dist/funscript-editor/funscript_editor/VERSION.txt
- name: Create Asset Archive
uses: vimtor/[email protected]
with:
files: dist/funscript-editor
recursive: true
dest: funscript-editor_${{ steps.get_version.outputs.version }}.zip
- name: Upload Windows Build Asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./funscript-editor_${{ steps.get_version.outputs.version }}.zip
asset_name: funscript-editor_${{ steps.get_version.outputs.version }}.zip
tag: ${{ github.ref }}
overwrite: true