|
|
@@ -373,78 +373,6 @@ jobs:
|
|
|
gh api -X DELETE "repos/${{ github.repository }}/actions/artifacts/${id}" || true
|
|
|
done
|
|
|
|
|
|
- steps:
|
|
|
- - name: Checkout code
|
|
|
- uses: actions/checkout@v5
|
|
|
-
|
|
|
- - name: Extract KernelSU Version Info
|
|
|
- id: ksu_version
|
|
|
- run: |
|
|
|
- set -euo pipefail
|
|
|
-
|
|
|
- KSU_REPO="https://github.com/pershoot/KernelSU-Next.git"
|
|
|
- KSU_INPUT="${{ inputs.ksu_branch }}"
|
|
|
- if [ -z "$KSU_INPUT" ]; then
|
|
|
- KSU_INPUT="dev-susfs"
|
|
|
- fi
|
|
|
-
|
|
|
- # Try as branch first, fall back to commit
|
|
|
- if git ls-remote --heads "$KSU_REPO" "$KSU_INPUT" | grep -q .; then
|
|
|
- echo "Cloning KernelSU-Next from branch: $KSU_INPUT"
|
|
|
- git clone --branch "$KSU_INPUT" "$KSU_REPO" /tmp/kernelsu-next
|
|
|
- cd /tmp/kernelsu-next
|
|
|
- KSUN_COMMIT=$(git rev-parse HEAD)
|
|
|
- else
|
|
|
- echo "Cloning KernelSU-Next from dev-susfs branch, then checking out commit: $KSU_INPUT"
|
|
|
- git clone --branch dev-susfs "$KSU_REPO" /tmp/kernelsu-next
|
|
|
- cd /tmp/kernelsu-next
|
|
|
- git fetch --depth=50 origin "$KSU_INPUT"
|
|
|
- git checkout "$KSU_INPUT"
|
|
|
- KSUN_COMMIT="$KSU_INPUT"
|
|
|
- fi
|
|
|
-
|
|
|
- COMMITS_COUNT=$(git rev-list --count HEAD)
|
|
|
- BASE_VERSION=30000
|
|
|
- KSU_VERSION=$(expr $COMMITS_COUNT "+" $BASE_VERSION)
|
|
|
-
|
|
|
- KSU_GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "no-tag")
|
|
|
-
|
|
|
- MANAGER_RUN_ID=$(curl -fsSL "https://api.github.com/repos/pershoot/KernelSU-Next/actions/workflows/build-manager-ci.yml/runs?head_sha=${KSUN_COMMIT}" | jq -r '.workflow_runs[0].id // empty')
|
|
|
- if [[ -n "${MANAGER_RUN_ID:-}" ]]; then
|
|
|
- KSU_MANAGER="https://github.com/pershoot/KernelSU-Next/actions/runs/${MANAGER_RUN_ID}"
|
|
|
- else
|
|
|
- KSU_MANAGER="https://github.com/pershoot/KernelSU-Next/actions/workflows/build-manager-ci.yml"
|
|
|
- fi
|
|
|
-
|
|
|
- echo "Commits count: $COMMITS_COUNT"
|
|
|
- echo "KSU Version: $KSU_VERSION"
|
|
|
- echo "KSU Git Tag: $KSU_GIT_TAG"
|
|
|
- echo "KSU Manager: $KSU_MANAGER"
|
|
|
-
|
|
|
- echo "KSUN_BRANCH=$KSUN_BRANCH" >> $GITHUB_ENV
|
|
|
- echo "KSUN_COMMIT=$KSUN_COMMIT" >> $GITHUB_ENV
|
|
|
- echo "KSU_COMMITS_COUNT=$COMMITS_COUNT" >> $GITHUB_ENV
|
|
|
- echo "KSU_VERSION=$KSU_VERSION" >> $GITHUB_ENV
|
|
|
- echo "KSU_GIT_TAG=$KSU_GIT_TAG" >> $GITHUB_ENV
|
|
|
- echo "KSU_MANAGER=$KSU_MANAGER" >> $GITHUB_ENV
|
|
|
-
|
|
|
- - name: Set release body
|
|
|
- run: |
|
|
|
- set -e
|
|
|
-
|
|
|
- RELEASE_NOTES_PATH="$RELEASE_NOTES"
|
|
|
- : > release_body.md
|
|
|
-
|
|
|
- python3 .github/scripts/render_release_body.py "$RELEASE_NOTES_PATH" > release_body.md
|
|
|
-
|
|
|
- - name: Publish release notes preview
|
|
|
- run: |
|
|
|
- {
|
|
|
- echo "## Release Notes Preview"
|
|
|
- echo
|
|
|
- cat release_body.md
|
|
|
- } >> "$GITHUB_STEP_SUMMARY"
|
|
|
-
|
|
|
release:
|
|
|
runs-on: ubuntu-latest
|
|
|
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.test_release_notes && (inputs.release_type == 'Pre-Release' || inputs.release_type == 'Release') }}
|