Skip to content

[Released 4.0.0-preview] #456

[Released 4.0.0-preview]

[Released 4.0.0-preview] #456

Workflow file for this run

name: "Build Tool"
permissions:
contents: write
discussions: write
on:
push:
paths:
- "bin/setting.ini"
workflow_dispatch:
jobs:
build:
needs: [build-win,build-linux,build-macos]
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.8.10"]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Generate Release Body
run: |
set ver $(cat bin\setting.ini | findstr version).Split()[2]
echo "Build times: ${{ github.run_number }}" >> body.md
echo "Version: $ver" >> body.md && echo Ok
echo "Changelog:" >> body.md
echo '```' >> body.md
git log -1 --pretty=%B $(git rev-parse HEAD) >> body.md
echo '```' >> body.md
echo $ver > version.txt && echo Ok
- name: Read version.txt
id: version
uses: juliangruber/read-file-action@v1
with:
path: ./version.txt
trim: true
- name: Rename Tool
run: |
cd MIO-KITCHEN-win
move ./MIO-KITCHEN-win.zip ../MIO-KITCHEN-${{ steps.version.outputs.content }}-win.zip
cd ..
cd MIO-KITCHEN-linux
move ./MIO-KITCHEN-linux.zip ../MIO-KITCHEN-${{ steps.version.outputs.content }}-linux.zip
cd ..
cd MIO-KITCHEN-macos
move ./MIO-KITCHEN-macos.zip ../MIO-KITCHEN-${{ steps.version.outputs.content }}-macos.zip
cd ..
cd MIO-KITCHEN-macos-intel
move ./MIO-KITCHEN-macos-intel.zip ../MIO-KITCHEN-${{ steps.version.outputs.content }}-macos-intel.zip
cd ..
- name: Upload release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitBodyDuringUpdate: true
removeArtifacts: true
name: "MIO-KITCHEN-${{ steps.version.outputs.content }}"
tag: "CI_BUILD_${{ github.run_number }}"
bodyFile: "body.md"
artifacts: "*.zip"
build-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8.10
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.8.10'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x86'
# You can test your matrix by printing the current Python version
- name: Update pip
run: python -m pip install -U --force-reinstall pip
- name: Pack tool
run: python build.py
- name: Upload Win Build
if: success()
uses: actions/upload-artifact@v4
with:
name: MIO-KITCHEN-win
path: './MIO-KITCHEN-win.zip'
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.10'
# Optional - x64 or x86 architecture, defaults to x64
- name: Install Packages
run: |
python3 -m pip install -U --force-reinstall pip
sudo apt update -y && sudo apt install python3-tk -y
- name: Pack Tool
run: python3 build.py
- name: Upload Linux Build
if: success()
uses: actions/upload-artifact@v4
with:
name: MIO-KITCHEN-linux
path: './MIO-KITCHEN-linux.zip'
build-macos:
strategy:
matrix:
os: [macos-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.12'
# Optional - x64 or x86 architecture, defaults to x64
- name: Install Packages
run: |
python3 -m pip install -U --force-reinstall pip
- name: Pack Tool
run: python3 build.py
- name: Upload Arm64 Macos Build
if: success() && matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: MIO-KITCHEN-macos
path: './MIO-KITCHEN-macos.zip'
- name: Upload x86_64 Macos Build
if: success() && matrix.os == 'macos-13'
uses: actions/upload-artifact@v4
with:
name: MIO-KITCHEN-macos-intel
path: './MIO-KITCHEN-macos-intel.zip'