refactoring, data format improvements, better search options, work in… #19
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: win_lin_release | |
on: | |
push: | |
branches: [ "main" ] | |
permissions: read-all | |
jobs: | |
########################################################################## | |
win-gen-version-build: | |
runs-on: windows-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: python setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: 'pip' | |
check-latest: true | |
- name: pip upgrade | |
run: python -m pip install --upgrade pip | |
- name: install requirements | |
run: pip install -r requirements.txt | |
##################################### | |
- name: generate version number | |
working-directory: ./scripts | |
run: "version.gen.bat" | |
shell: cmd | |
- name: version upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: version | |
path: ./src/version.txt | |
if-no-files-found: error | |
- name: convert icons to python source | |
working-directory: ./scripts | |
run: "icons.convert.bat" | |
shell: cmd | |
##################################### | |
- name: run nuitka | |
working-directory: ./scripts | |
run: "nuitka.run.bat" | |
shell: cmd | |
- name: upload nuitka onefile gui | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nuitka-win-onefile-gui | |
path: ./build-nuitka-win/G/librer.exe | |
if-no-files-found: error | |
- name: upload nuitka onefile cmd | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nuitka-win-onefile-cmd | |
path: ./build-nuitka-win/C/librercmd.exe | |
if-no-files-found: error | |
- name: upload nuitka distro | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nuitka-win-distro | |
path: ./build-nuitka-win/librer.nuitka.win.zip | |
if-no-files-found: error | |
##################################### | |
- name: run pyinstaller | |
working-directory: ./scripts | |
run: "pyinstaller.run.bat" | |
shell: cmd | |
- name: upload pyinstaller onefile gui | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pyinstaller-win-onefile-gui | |
path: ./build-pyinstaller-win/O_G/librer.exe | |
if-no-files-found: error | |
- name: upload pyinstaller onefile cmd | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pyinstaller-win-onefile-cmd | |
path: ./build-pyinstaller-win/O_C/librercmd.exe | |
if-no-files-found: error | |
- name: upload pyinstaller distro | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pyinstaller-win-distro | |
path: ./build-pyinstaller-win/librer.pyinstaller.win.zip | |
if-no-files-found: error | |
########################################################################## | |
build-lin-release: | |
permissions: write-all | |
needs: [win-gen-version-build] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: python setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: 'pip' | |
check-latest: true | |
- name: pip upgrade | |
run: python -m pip install --upgrade pip | |
- name: install requirements | |
run: pip install -r requirements.txt | |
- name: strip python binaries | |
run: find $pythonLocation -name *.so* -type f -exec strip {} \; | |
- name: version download | |
uses: actions/download-artifact@v3 | |
with: | |
name: version | |
path: ./src | |
- name: convert icons to python source | |
working-directory: ./scripts | |
run: bash "icons.convert.sh" | |
##################################### | |
- name: run nuitka | |
working-directory: ./scripts | |
run: bash "nuitka.run.sh" | |
- name: upload nuitka onefile | |
uses: actions/upload-artifact@v3 | |
with: | |
name: librer-nuitka-lin-onefile | |
path: ./build-nuitka-lin/librer | |
if-no-files-found: error | |
- name: upload nuitka distro | |
uses: actions/upload-artifact@v3 | |
with: | |
name: librer-nuitka-lin-distro | |
path: ./build-nuitka-lin/librer.nuitka.lin.zip | |
if-no-files-found: error | |
##################################### | |
- name: run pyinstaller | |
working-directory: ./scripts | |
run: bash "pyinstaller.run.sh" | |
- name: upload pyinstaller onefile | |
uses: actions/upload-artifact@v3 | |
with: | |
name: librer-pyinstaller-lin-onefile | |
path: ./build-pyinstaller-lin/librer | |
if-no-files-found: error | |
- name: upload pyinstaller distro | |
uses: actions/upload-artifact@v3 | |
with: | |
name: librer-pyinstaller-lin-distro | |
path: ./build-pyinstaller-lin/librer.pyinstaller.lin.zip | |
if-no-files-found: error | |
##################################### | |
- name: version read | |
id: version | |
run: echo "version=$(cat ./src/version.txt)" >> $GITHUB_OUTPUT | |
- name: pack linux onefile nuitka | |
run: | | |
cd ./build-nuitka-lin | |
chmod 777 ./librer | |
tar -czvf ../librer_auxiliary.${{ steps.version.outputs.version }}.portable.linux.nuitka.onefile.tgz librer | |
rm ./librer | |
- name: move linux distro nuitka | |
run: | | |
cd ./build-nuitka-lin | |
mv ./librer.nuitka.lin.zip ../librer_auxiliary.${{ steps.version.outputs.version }}.portable.linux.nuitka.tgz | |
- name: pack linux onefile pyinstaller | |
run: | | |
cd ./build-pyinstaller-lin | |
chmod 777 ./librer | |
tar -czvf ../librer.${{ steps.version.outputs.version }}.portable.linux.onefile.tgz librer | |
rm ./librer | |
- name: move linux distro pyinstaller | |
run: | | |
cd ./build-pyinstaller-lin | |
mv ./librer.pyinstaller.lin.zip ../librer.${{ steps.version.outputs.version }}.portable.linux.tgz | |
##################################### | |
- name: download windows onefile nuitka gui | |
uses: actions/download-artifact@v3 | |
with: | |
name: nuitka-win-onefile-gui | |
path: ./ | |
- name: download windows onefile nuitka cmd | |
uses: actions/download-artifact@v3 | |
with: | |
name: nuitka-win-onefile-cmd | |
path: ./ | |
- name: pack windows onefile nuitka | |
run: zip -9 -m librer_auxiliary.${{ steps.version.outputs.version }}.portable.windows.nuitka.onefile.zip librer.exe librercmd.exe | |
- name: download windows onefile pyinstaller gui | |
uses: actions/download-artifact@v3 | |
with: | |
name: pyinstaller-win-onefile-gui | |
path: ./ | |
- name: download windows onefile pyinstaller cmd | |
uses: actions/download-artifact@v3 | |
with: | |
name: pyinstaller-win-onefile-cmd | |
path: ./ | |
- name: pack windows onefile pyinstaller | |
run: zip -9 -m librer.${{ steps.version.outputs.version }}.portable.windows.onefile.zip librer.exe librercmd.exe | |
- name: download windows distro nuitka | |
uses: actions/download-artifact@v3 | |
with: | |
name: nuitka-win-distro | |
path: ./ | |
- name: rename windows zip | |
run: mv ./librer.nuitka.win.zip ./librer_auxiliary.${{ steps.version.outputs.version }}.portable.windows.nuitka.zip | |
- name: download windows distro pyinstaller | |
uses: actions/download-artifact@v3 | |
with: | |
name: pyinstaller-win-distro | |
path: ./ | |
- name: rename windows zip | |
run: mv ./librer.pyinstaller.win.zip ./librer.${{ steps.version.outputs.version }}.portable.windows.zip | |
##################################### | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.version.outputs.version }} | |
name: Release ${{ steps.version.outputs.version }} | |
draft: false | |
prerelease: true | |
files: | | |
librer.${{ steps.version.outputs.version }}.portable.linux.tgz | |
librer.${{ steps.version.outputs.version }}.portable.linux.onefile.tgz | |
librer.${{ steps.version.outputs.version }}.portable.windows.zip | |
librer.${{ steps.version.outputs.version }}.portable.windows.onefile.zip | |
librer_auxiliary.${{ steps.version.outputs.version }}.portable.linux.nuitka.onefile.tgz | |
librer_auxiliary.${{ steps.version.outputs.version }}.portable.linux.nuitka.tgz | |
librer_auxiliary.${{ steps.version.outputs.version }}.portable.windows.nuitka.onefile.zip | |
librer_auxiliary.${{ steps.version.outputs.version }}.portable.windows.nuitka.zip |