Skip to content

update flake

update flake #26

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