Build Tool #3
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: "Build Tool" | |
permissions: | |
contents: write | |
discussions: write | |
on: | |
push: | |
paths: | |
- "build.py" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
needs: [build-win,build-linux] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
- name: Rename Tool | |
run: | | |
cd Magisk_Patch-win | |
move ./Magisk_Patch-win.zip ../Magisk_Patch-${{ github.run_number }}-win.zip | |
cd .. | |
cd Magisk_Patch-linux | |
ls | |
move ./Magisk_Patch-linux.zip ../Magisk_Patch-${{ github.run_number }}-linux.zip | |
cd .. | |
- name: Upload release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
removeArtifacts: true | |
name: "Magisk_Patch-${{ github.run_number }}" | |
tag: "CI_BUILD_${{ github.run_number }}" | |
body: | | |
Build times: ${{ github.run_number }} | |
Note:If u cannot run it in linux,you may need do "chmod a+x ./*" | |
Minimum support: Ubuntu 20.04 (64bit),Windows Vista (32bit) | |
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: Build tool | |
run: | | |
python build.py | |
- name: Upload Win Build | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Magisk_Patch-win | |
path: './Magisk_Patch-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: Build Tool | |
run: | | |
python3 build.py | |
- name: Upload Linux Build | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Magisk_Patch-linux | |
path: './Magisk_Patch-linux.zip' |