Skip to content

Update translation #331

Update translation

Update translation #331

Workflow file for this run

name: "Build Tool"
permissions:
contents: write
discussions: write
on:
push:
paths:
- "bin/setting.ini"
pull_request:
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@v3
- name: Get Version
id: tool_version
run: |
set ver $(cat bin\setting.ini | findstr version).Split()[2]
echo $ver
echo "::set-output name=version::$ver"
- name: Get last commit SHA
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
- name: Get last commit message
id: commit_message
run: echo "::set-output name=message::$(git log -1 --pretty=%B ${{ steps.get_sha.outputs.sha }})"
- name: Rename Tool
# Compress-Archive -Path ./* -DestinationPath ../MIO-KITCHEN-linux-aarch64.zip
# move MIO-KITCHEN-linux-aarch64.zip MIO-KITCHEN-${{ steps.tool_version.outputs.version }}-linux-aarch64.zip
run: |
cd MIO-KITCHEN-win
move ./MIO-KITCHEN-win.zip ../MIO-KITCHEN-${{ steps.tool_version.outputs.version }}-win.zip
cd ..
cd MIO-KITCHEN-linux
move ./MIO-KITCHEN-linux.zip ../MIO-KITCHEN-${{ steps.tool_version.outputs.version }}-linux.zip
cd ..
cd MIO-KITCHEN-macos
move ./MIO-KITCHEN-macos.zip ../MIO-KITCHEN-${{ steps.tool_version.outputs.version }}-macos.zip
cd ..
- name: Upload release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitBodyDuringUpdate: true
removeArtifacts: true
name: "MIO-KITCHEN-${{ steps.tool_version.outputs.version }}"
tag: "CI_BUILD_${{ github.run_number }}"
body: |
Changelog: ${{ steps.commit_message.outputs.message }}
Build times: ${{ github.run_number }}
Version: ${{ steps.tool_version.outputs.version }}
Note:If u cannot run it in linux,you may need do "chmod a+x ./*"
Author: MIO-KITCHEN-TEAM
* MacOS Notice:if you want use brotli,u need "brew install gettext",A few Functions are not support Macos now *
Minimum support: Ubuntu 20.04 (64bit|aarch64),Windows Vista (32bit),Macos Latest(X86_64)
artifacts: "*.zip"
build-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8.10
uses: actions/setup-python@v4
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
ls
- name: Upload Win Build
if: success()
uses: actions/upload-artifact@v3
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@v4
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
ls
- name: Upload Linux Build
if: success()
uses: actions/upload-artifact@v3
with:
name: MIO-KITCHEN-linux
path: './MIO-KITCHEN-linux.zip'
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Packages
run: |
sudo rm -rf /usr/local/bin/2to3*
brew install python-tk python3 tcl-tk
python3 -m pip install -U --force-reinstall pip
- name: Pack Tool
run: |
python3 build.py
ls
- name: Upload Macos Build
if: success()
uses: actions/upload-artifact@v3
with:
name: MIO-KITCHEN-macos
path: './MIO-KITCHEN-macos.zip'