Skip to content

Update README.md

Update README.md #7

name: Build and Release
on:
push:
tags:
- 'standalone-v*'
jobs:
build:
name: Build packages
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
target: Windows
cmd-install: |
python -m venv env
.\env\Scripts\activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
cmd-build: |
cd standalone
..\env\Scripts\pyinstaller gui_windows.spec
cd dist
ren mltd-relive-standalone.exe mltd-relive-${{ github.ref_name }}-windows.exe
out-name: windows
out-path: standalone/dist/mltd-relive-${{ github.ref_name }}-windows.exe
- os: ubuntu-latest
target: Ubuntu
cmd-install: |
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
cmd-build: |
cd standalone
../env/bin/pyinstaller gui_ubuntu.spec
cd dist
mv mltd-relive-standalone mltd-relive-${{ github.ref_name }}-ubuntu
out-name: ubuntu
out-path: standalone/dist/mltd-relive-${{ github.ref_name }}-ubuntu
- os: macos-latest
target: macOS
cmd-install: |
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
cmd-build: |
cd standalone
../env/bin/pyinstaller gui_macos.spec
cd dist
zip -r9 mltd-relive-${{ github.ref_name }}-macos.zip mltd-relive-standalone.app
out-name: macos
out-path: standalone/dist/mltd-relive-${{ github.ref_name }}-macos.zip
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies for ${{ matrix.target }}
run: ${{ matrix.cmd-install }}
- name: Build with PyInstaller for ${{ matrix.target }}
run: ${{ matrix.cmd-build }}
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.out-name }}
path: ${{ matrix.out-path }}
createrelease:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download build actifacts
uses: actions/download-artifact@v3
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
name: mltd-relive-${{ github.ref_name }}
artifacts: 'LICENSE,windows/*,ubuntu/*,macos/*'