name: Build and release on: [workflow_dispatch] jobs: build: runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout id: checkout uses: actions/checkout@v4 - name: Cleanup id: cleanup uses: rokibhasansagar/slimhub_actions@main - name: Setup Packages id: setup-packages run: | sudo apt update sudo apt upgrade -y sudo apt install make ninja-build cmake extra-cmake-modules zip -y - name: Setup Android NDK id: setup-ndk run: | wget "https://dl.google.com/android/repository/android-ndk-r28c-linux.zip" unzip *.zip && rm *.zip working-directory: ${{ github.workspace }} - name: Build And Prepare For Release id: build run: | git clone https://git.yzbruh.space/${{ github.repository }} -b main ./pmt && cd pmt export ANDROID_NDK="${{ github.workspace }}/android-ndk-r28c" bash build.sh clean bash build.sh build -DCMAKE_BUILD_TYPE=Release cd build_arm64-v8a cp src/pmt src/pmt_static srclib/libhelper/libhelper.* srclib/libpartition_map/libpartition_map.* . zip pmt-arm64-v8a.zip pmt libhelper.* libpartition_map.* zip pmt-static-arm64-v8a.zip pmt_static cd ../build_armeabi-v7a cp src/pmt src/pmt_static srclib/libhelper/libhelper.* srclib/libpartition_map/libpartition_map.* . zip pmt-armeabi-v7a.zip pmt libhelper.* libpartition_map.* zip pmt-static-armeabi-v7a.zip pmt_static echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV echo "BUILD=${{ github.workspace }}/pmt" >> $GITHUB_ENV cd .. echo -e "Read [Wiki - About Release Types](https://git.yzbruh.space/${{ github.repository }}/wiki/About-Release-Types) for getting more information.\n\n### Changes\n" > release.txt git log --since="2025-08-21" --pretty=format:" * %ad | [%s](https://git.yzbruh.space/${{ github.repository }}/commit/%H)" --date=short | sed 's/ -.*//' | grep -v cleanup >> release.txt working-directory: ${{ github.workspace }} - name: Upload To GitHub Releases id: upload-to-release uses: softprops/action-gh-release@v2 with: files: | ${{ env.BUILD }}/build_arm64-v8a/*.zip ${{ env.BUILD }}/build_armeabi-v7a/*.zip name: Partition Manager Tool Release ${{ env.BUILD_DATE }} tag_name: ${{ env.BUILD_DATE }} body_path: ${{ env.BUILD }}/release.txt