2020 id : ver
2121 run : |
2222 SHORT=$(git rev-parse --short HEAD)
23+ # versionCode = total number of commits
2324 CODE=$(git rev-list --count HEAD)
25+ # bump minor version from current module.prop major
2426 MAJOR=$(grep '^version=' module.prop | sed 's/version=\([0-9]*\).*/\1/')
2527 VERSION="${MAJOR}.$(( CODE )) (${CODE}-${SHORT}-release)"
2628 TAG="v${MAJOR}.${CODE}-${SHORT}"
3133
3234 - name : Generate sha256 files
3335 run : |
36+ # Find all files except .sha256, .git, and update.Json (which changes post-build)
3437 find . \
3538 -not -path './.git/*' \
39+ -not -path './.github/*' \
3640 -not -name '*.sha256' \
3741 -not -name 'update.Json' \
3842 -type f | while read -r f; do
4852 id : zip
4953 run : |
5054 ZIPNAME="YetAnotherBootloopProtector-${{ steps.ver.outputs.code }}-${{ steps.ver.outputs.tag }}.zip"
55+ # Exclude .git, update.Json (updated separately after release), and README
5156 zip -r "$ZIPNAME" . \
5257 -x '.git/*' \
5358 -x '.github/*' -x '.github/**/*' \
8085 run : |
8186 git config user.name "github-actions[bot]"
8287 git config user.email "github-actions[bot]@users.noreply.github.com"
83- git add '*.sha256' '*/*.sha256' '*/*/*.sha256' '*/*/*/*.sha256' module.prop update.Json
88+ # Stage everything: sha256 files, module.prop, update.Json
89+ git add module.prop update.Json
90+ git add $(git ls-files --others --exclude-standard | grep '\.sha256
8491 git commit -m "chore: release ${{ steps.ver.outputs.tag }} [skip ci]"
85- git push
92+ git push
93+ | grep -v '^\.github/')
94+ git commit -m "chore : release ${{ steps.ver.outputs.tag }} [skip ci]"
95+ git push
0 commit comments