Skip to content

build

build #74

Workflow file for this run

# This is a basic workflow that is manually triggered
name: build
on:
push:
paths:
- ".github/workflows/build.yml"
- "build.py"
pull_request:
paths:
- ".github/workflows/build.yml"
- "build.py"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python3
uses: actions/setup-python@v5
with:
python-version: "3.8.x"
- name: Clone repo
run: |
git clone --recurse-submodules https://github.com/xiaoxindada/magiskboot_ndk_on_linux.git magiskboot
- name: Strart build
run: |
cd $GITHUB_WORKSPACE/magiskboot
echo "MAGISK_VERSION=$(cat magisk_config.prop | grep "magisk.versionCode=" | cut -d '=' -f 2)" >> $GITHUB_ENV
pip3 install wget
python3 ./build.py --build_binary
ls -al out/**
- name: Compress out
run: |
cd $GITHUB_WORKSPACE/magiskboot
7za a magiskboot.7z out/*
- name: Upload output to GH-Release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ github.workspace }}/magiskboot/magiskboot.7z"
name: "Magiskboot-${{ env.MAGISK_VERSION }}"
tag: "Magiskboot-${{ env.MAGISK_VERSION }}-${{ github.run_number }}"
bodyFile: "${{ github.workspace}}/magiskboot/out/magisk_version.txt"
token: ${{ secrets.GITHUB_TOKEN }}