Update README.md (#42) #270
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: Windows Build | |
on: | |
push: | |
branches: [ dev, main ] | |
workflow_dispatch: | |
jobs: | |
build-win: | |
if: contains(github.event.head_commit.message, '[build-win]' ) || github.event_name == 'workflow_dispatch' # only run if commit message contains [build] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- 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 .. | |
# cp changelog.txt dist/ | |
- name: Build Windows Binary | |
run: | | |
pyinstaller --onefile aimm.py --add-data 'LICENSE;.' --name aimm --distpath dist/ | |
cp LICENSE dist/ | |
cp resources/install/win/Installation-Instructions.txt dist/ | |
mkdir out && cd dist && Compress-Archive -Path . -DestinationPath ../out/aimm-windows-binary.zip | |
cd .. | |
- name: Install pynsist | |
run: | | |
pip install pynsist | |
- name: Build Windows-Installer | |
run: | | |
cp resources/install/win/installer.cfg installer.cfg | |
pynsist installer.cfg | |
cp build/nsis/aimm-windows-installer.exe out/ | |
- 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-win.json' | |
local-dir: "out/" | |
server-dir: "" | |
- name: Upload Release Windows | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Windows Binary | |
path: out/aimm-windows-installer.exe |