File tree Expand file tree Collapse file tree 3 files changed +97
-0
lines changed
Expand file tree Collapse file tree 3 files changed +97
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ BUILD_TYPE=" AB"
4+
5+ # udroid-on-android latest tag
6+ udroid_version=$(
7+ git -c ' versionsort.suffix=-' ls-remote --tags --sort=' v:refname' \
8+ https://github.com/RandomCoderOrg/udroid-on-android.git \
9+ | tail -n1 | cut -d / -f 3 | cut -d v -f 2-
10+ )
11+
12+ # udroid-download version
13+ udroid_download=$(
14+ git -c ' versionsort.suffix=-' ls-remote --tags --sort=' v:refname' \
15+ https://github.com/RandomCoderOrg/udroid-download \
16+ | tail -n1 | cut -d / -f 3
17+ )
18+
19+ version=" V${udroid_version}${BUILD_TYPE} R$(( ${udroid_download: -1} + 1 )) "
20+
21+ # export version to github environment
22+ echo " VERSIONTAG=$version " >> " $GITHUB_ENV "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ touch release.md
4+
5+ echo " # Release Notes $VERSIONTAG " > release.md
6+
7+ echo " \`\`\` " >> release.md
8+ for files in $( find . -name " *.tar.gz" ) ; do sha256sum " $files " >> release.md; done
9+ echo " \`\`\` " >> release.md
10+
11+ echo " ###### udroid tarballs ( intended to use with termux proot environment )" >> release.md
Original file line number Diff line number Diff line change 1+ name : Build and Release
2+ on :
3+ push :
4+ branches :
5+ - master
6+ - anchor
7+
8+ jobs :
9+ BuildRaw :
10+ runs-on : ubuntu-latest
11+ setps :
12+ - uses : actions/checkout@v2
13+ - uses : docker/setup-qemu-action@v1.2.0
14+
15+ - name : Setup Dependencies
16+ run : sudo apt-get update; sudo apt-get install git build-essential binfmt-support qemu-user-static debootstrap -y
17+
18+ - name : Build tarballs
19+ run : |
20+ sudo bash build.sh -s impish -v raw -a all
21+ sudo bash build.sh -s jammy -v raw -a all
22+ sudo bash build.sh -s kinetic -v raw -a all
23+
24+ - name : upload artifacts
25+ uses : actions/upload-artifact@v3
26+ with :
27+ name : raw-tarballs
28+ path : fs-cook/out/*.tar.gz
29+
30+ Create-Release :
31+ runs-on : ubuntu-latest
32+ requires :
33+ - BuildRaw
34+ setps :
35+ - uses : actions/checkout@v2
36+ - uses : actions/download-artifact@v3
37+ with :
38+ name : raw-tarballs
39+ - name : Compute release tag
40+ run : sudo bash .github/scripts/compute-release-tag.sh
41+ - name : Generate release notes
42+ run : sudo bash .github/scripts/generate-release-notes.sh
43+ - name : Create Release
44+ id : create_release
45+ uses : actions/create-release@v1
46+ env :
47+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48+ with :
49+ tag_name : ${{ env.VERSIONTAG }}
50+ release_name : ${{ env.VERSIONTAG }}
51+ body_path : release.md
52+ draft : false
53+ prerelease : false
54+ - name : Upload assets
55+ run : |
56+ set -x
57+ assets=()
58+ for asset in ./*.tar.gz; do
59+ assets+=("-a" "$asset")
60+ done
61+ tag_name="${VERSIONTAG}"
62+ hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
63+ env :
64+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments