Skip to content

Update README.md (#42) #262

Update README.md (#42)

Update README.md (#42) #262

Workflow file for this run

name: Linux Build
on:
push:
branches: [ dev, main ]
workflow_dispatch:
jobs:
build-lin:
if: contains(github.event.head_commit.message, '[build-linux]' ) || github.event_name == 'workflow_dispatch' # only run if commit message contains [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Generate change log
run: |
git clone https://github.com/visioninit/aimm
cd aimm
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:' * %s' | sed '/Merge/d' > changelog.txt
cp changelog.txt ..
cd ..
mkdir dist
cp changelog.txt dist/
- name: Build Linux Binary
run: |
pyinstaller --onefile aimm.py --add-data 'LICENSE:.' --name aimm --distpath dist/
cp LICENSE dist/
cp resources/install/linux/Installation-Instructions.txt dist/
mkdir out && cd dist && tar -zcvf ../out/aimm-linux-binary.tar.gz *
- name: Tests
if: contains(github.event.head_commit.message, '[tests]') # only run if commit message contains [build]
run: |
dist/aimm
dist/aimm init
dist/aimm add BSRGAN
dist/aimm list
dist/aimm remove BSRGAN
dist/aimm search GFPGAN
- name: set package version
run: |
echo "***************************************"
dist/aimm --version
echo "***************************************"
echo "DEBIAN_PACKAGE_VERSION=$(dist/aimm --version | awk -F: '{print $2}' | tr -d ' ')+$(date +%Y%m%d%H%M)" >> $GITHUB_ENV
- name: Build Debian Package
run: |
sudo apt-get update -y
sudo apt-get install -y dpkg-dev devscripts
sudo apt-get build-dep -y --no-install-recommends .
dch --newversion $DEBIAN_PACKAGE_VERSION -D unstable -m 'Build Debian package.'
debuild -b -us -uc
mv ../*.deb out/aimm-linux-installer.deb
- name: πŸ“‚ Deploy FTP
uses: SamKirkland/FTP-Deploy-Action@4.3.2
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
state-name: '.ftp-deploy-sync-state-linux.json'
local-dir: "out/"
server-dir: ""
# - name: Upload Release Linux
# uses: actions/upload-artifact@v3
# with:
# name: Linux Binary
# path: |
# dist/aimm
# *.deb