merging update #12
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 executable for Windows | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build-executable: | |
runs-on: windows-latest | |
env: | |
PYTHON_VERSION: 3.11.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup python embeddable version | |
run: | | |
mkdir python-${{ env.PYTHON_VERSION }} | |
curl -O https://www.python.org/ftp/python/${{ env.PYTHON_VERSION }}/python-${{ env.PYTHON_VERSION }}-embed-amd64.zip | |
unzip python-${{ env.PYTHON_VERSION }}-embed-amd64.zip -d python-${{ env.PYTHON_VERSION }} | |
rm python-${{ env.PYTHON_VERSION }}-embed-amd64.zip | |
- name: Install pip | |
run: | | |
curl -O https://bootstrap.pypa.io/get-pip.py | |
./python-${{ env.PYTHON_VERSION }}/python get-pip.py --no-warn-script-location | |
rm get-pip.py | |
- name: Uncomment 'import site' in python311._pth file | |
run: | | |
sed -i 's/#import site/import site/' python-${{ env.PYTHON_VERSION }}/python311._pth | |
- name: Install Required Packages | |
run: .\python-${{ env.PYTHON_VERSION }}\python -m pip install --force-reinstall -r requirements-windows.txt --no-warn-script-location | |
- name: Create FBmn-STATS-GUIde.bat file | |
run: | | |
echo '@echo off' > FBmn-STATS-GUIde.bat | |
echo '.\\python-${{ env.PYTHON_VERSION }}\\python -m streamlit run Statistics_for_Metabolomics.py' >> FBmn-STATS-GUIde.bat | |
- name: Create All-in-one executable folder | |
run: | | |
mkdir streamlit_exe | |
mv python-${{ env.PYTHON_VERSION }} streamlit_exe | |
mv FBmn-STATS-GUIde.bat streamlit_exe | |
cp -r src streamlit_exe | |
cp -r pages streamlit_exe | |
cp -r assets streamlit_exe | |
cp -r example-data streamlit_exe | |
cp -r .streamlit streamlit_exe | |
cp Statistics_for_Metabolomics.py streamlit_exe | |
- name: Compress streamlit_exe folder to FBmn-STATS-GUIde.zip | |
run: | | |
7z a FBmn-STATS-GUIde.zip ./streamlit_exe/* -r | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: FBmn-STATS-GUIde | |
path: FBmn-STATS-GUIde.zip |