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 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://github.com/ShawkTeam/pmt-renovated -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.* ibpartition_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.* ibpartition_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 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: "Read [RELEASE-TYPES.md](https://github.com/ShawkTeam/pmt-renovated/blob/main/RELEASE-TYPES.md) for getting more information."