name: Build and Release GKI Kernels permissions: contents: write # Allow writing to repository contents (for pushing tags) actions: write # Allows triggering actions on: #push: # branches: # - main # Trigger on push to the main branch workflow_dispatch: inputs: build_a12: description: 'Build Android 12 kernel?' required: true type: boolean default: true build_a13: description: 'Build Android 13 kernel?' required: true type: boolean default: true build_a14: description: 'Build Android 14 kernel?' required: true type: boolean default: true make_release: description: 'Do you want to create a release?' required: true type: boolean default: false jobs: build-kernel-a12: uses: ./.github/workflows/build-kernel-a12.yml secrets: inherit if: ${{ github.event.inputs.build_a12 == 'true' || github.event.inputs.build_a12 == '' }} build-kernel-a13: uses: ./.github/workflows/build-kernel-a13.yml secrets: inherit if: ${{ github.event.inputs.build_a13 == 'true' || github.event.inputs.build_a13 == '' }} build-kernel-a14: uses: ./.github/workflows/build-kernel-a14.yml secrets: inherit if: ${{ github.event.inputs.build_a14 == 'true' || github.event.inputs.build_a14 == '' }} trigger-release: runs-on: ubuntu-latest needs: - build-kernel-a12 - build-kernel-a13 - build-kernel-a14 # Ensure the release only runs after the build jobs complete or are skipped if: ${{ github.event.inputs.make_release == 'true' }} # Only run if make_release is true or empty env: REPO_OWNER: TheWildJames REPO_NAME: GKI_KernelSU_SUSFS GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_NAME: "*TEST BUILD* GKI Kernels With KernelSU & SUSFS v1.5.3 *TEST BUILD*" RELEASE_NOTES: | This release contains KernelSU and SUSFS v1.5.3 Module: -> https://github.com/sidex15/ksu_module_susfs Official Manager: -> https://github.com/tiann/KernelSU Non-Official Managers: -> https://github.com/rifsxd/KernelSU-Next -> https://github.com/backslashxx/KernelSU -> https://github.com/rsuntk/KernelSU -> https://github.com/5ec1cff/KernelSU -> https://github.com/silvzr/KernelSU -> https://github.com/sidex15/KernelSU Features: [+] KernelSU-Next [+] SUSFS v1.5.3 [+] Wireguard Support [+] Maphide LineageOS Detections [+] Futile Maphide for jit-zygote-cache Detections [+] Magic Mount Support Special thanks to the following people for their contributions! This helps me alot! <3 simonpunk - Created SUSFS! sidex15 - Created module! backslashxx - Helped with patches! 幕落 - Donation! If you have contributed and are not here please remind me! steps: # Checkout the code - name: Checkout code uses: actions/checkout@v3 # Get the Latest Tag from GitHub - name: Generate and Create New Tag run: | # Fetch the latest tag from GitHub (this is the latest tag based on the GitHub API) LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name') if [ -z "$LATEST_TAG" ]; then LATEST_TAG="v1.5.3-0" # Default to v1.5.3-0 if no tag exists fi # Increment the suffix (e.g., v1.5.3-0 becomes v1.5.3-1) NEW_TAG=$(echo "$LATEST_TAG" | awk -F- '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-%d", $1, suffix}') # Output the new tag to be used echo "New tag: $NEW_TAG" # Set the new tag as an environment variable to be used in later steps echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV # Create the tag in the repository git tag $NEW_TAG git push origin $NEW_TAG # Download Artifacts for A12 (Only if A12 Build is successful or input is true or empty) - name: Download Artifacts for A12 (Only if A12 Build is successful or skipped) if: ${{ github.event.inputs.build_a12 == 'true' || github.event.inputs.build_a12 == '' }} uses: actions/download-artifact@v3 with: name: kernel-artifacts-a12 path: ./downloaded-artifacts # Download Artifacts for A13 (Only if A13 Build is successful or input is true or empty) - name: Download Artifacts for A13 (Only if A13 Build is successful or skipped) if: ${{ github.event.inputs.build_a13 == 'true' || github.event.inputs.build_a13 == '' }} uses: actions/download-artifact@v3 with: name: kernel-artifacts-a13 path: ./downloaded-artifacts # Download Artifacts for A14 (Only if A14 Build is successful or input is true or empty) - name: Download Artifacts for A14 (Only if A14 Build is successful or skipped) if: ${{ github.event.inputs.build_a14 == 'true' || github.event.inputs.build_a14 == '' }} uses: actions/download-artifact@v3 with: name: kernel-artifacts-a14 path: ./downloaded-artifacts # Create the downloaded-artifacts directory - name: Create download artifacts directory run: mkdir -p ./downloaded-artifacts # Create placeholder files - name: Create Placeholder Files run: | echo "This is a placeholder for A12 kernel" > ./downloaded-artifacts/placeholder_a12.txt echo "This is a placeholder for A13 kernel" > ./downloaded-artifacts/placeholder_a13.txt echo "This is a placeholder for A14 kernel" > ./downloaded-artifacts/placeholder_a14.txt # Create GitHub Release and upload files if make_release is true - name: Create GitHub Release if: ${{ github.event.inputs.make_release == 'true' }} uses: softprops/action-gh-release@v1 with: files: ./downloaded-artifacts/* tag_name: ${{ env.NEW_TAG }} # Use the generated tag for the release prerelease: true # Mark the release as a pre-release name: ${{ env.RELEASE_NAME }} # Pass the RELEASE_NAME to the action body: ${{ env.RELEASE_NOTES }} # Pass the RELEASE_NOTES to the action env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Display Files Uploaded - name: Display Files Uploaded run: | echo "GitHub release created with the following files:" ls ./downloaded-artifacts