Skip to content

Commit 5569f92

Browse files
committed
Workflow fixes
1 parent 833befb commit 5569f92

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

.github/workflows/build.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,20 @@ jobs:
3636
3737
- name: Building LPoS + KernelSU
3838
run: |
39-
DEVICE=${{ matrix.device }} ./build.sh -k
39+
DEVICE=${{ matrix.device }} ./build.sh -k
4040
41+
upload:
42+
runs-on: ubuntu-latest
43+
needs: build
44+
steps:
4145
- name: Upload artifacts
4246
uses: actions/upload-artifact@v4
4347
with:
4448
name: "LPOS_${{ matrix.device }}"
4549
path: |
46-
out/${{ matrix.device }}/*.zip
47-
48-
upload:
49-
runs-on: ubuntu-latest
50-
needs: build
51-
steps:
50+
out/${{ matrix.device }}/LPoS-${{ matrix.device }}-KSU-${{ github.event.inputs.tag }}.tar.zip
51+
out/${{ matrix.device }}/LPoS-${{ matrix.device }}-${{ github.event.inputs.tag }}.tar.zip
52+
5253
- name: Create release
5354
uses: ncipollo/release-action@v1
5455
with:
@@ -57,15 +58,19 @@ jobs:
5758
draft: false
5859
prerelease: false
5960
token: ${{ secrets.TOKEN }}
60-
artifacts: out/${{ matrix.device }}/*.zip
61+
artifacts: |
62+
out/${{ matrix.device }}/LPoS-${{ matrix.device }}-KSU-${{ github.event.inputs.tag }}.tar.zip
63+
out/${{ matrix.device }}/LPoS-${{ matrix.device }}-${{ github.event.inputs.tag }}.tar.zip
6164
body: "Commit SHA: ${{ github.sha }}"
6265

6366
- name: Upload to Telegram
6467
uses: appleboy/telegram-action@master
6568
with:
6669
to: ${{ secrets.TELEGRAM_CHAT_ID }}
6770
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
68-
document: out/${{ matrix.device }}/*.zip
71+
document: |
72+
out/${{ matrix.device }}/LPoS-${{ matrix.device }}-KSU-${{ github.event.inputs.tag }}.tar.zip
73+
out/${{ matrix.device }}/LPoS-${{ matrix.device }}-${{ github.event.inputs.tag }}.tar.zip
6974
format: html
7075
disable_web_page_preview: false
7176
message: |

build.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ if [ -z "$DEVICE" ]; then
1111
export DEVICE="S10-5G"
1212
fi
1313

14+
if [ -z "$DEVICE" ]; then
15+
export LPOS_KERNEL_VERSION="dev"
16+
fi
1417

1518
if [ ! -f "$HOME/python" ]; then
1619
ln -s /usr/bin/python2.7 "$HOME/python"
@@ -76,7 +79,10 @@ packing() {
7679
sudo chmod +777 *
7780
tar -cvf "${FILE_NAME}.tar" boot.img dt.img vbmeta.img ; rm boot.img dt.img vbmeta.img
7881
zip -9 "${FILE_NAME}.tar.zip" "${FILE_NAME}.tar"
79-
mkdir "${DEVICE}" && mv "${FILE_NAME}.tar.zip" "${DEVICE}"
82+
if [ ! -d "${DEVICE}" ]; then
83+
mkdir "${DEVICE}"
84+
fi
85+
mv "${FILE_NAME}.tar.zip" "${DEVICE}"
8086
cd "${WDIR}"
8187
echo -e "\n\n[i] Compilation Done for ${DEVICE}..🌛"
8288
}

0 commit comments

Comments
 (0)