Skip to content

Commit a3d3ad7

Browse files
Update build.yml
Add support for APKs Signed-off-by: humaita-github <[email protected]>
1 parent af27c10 commit a3d3ad7

1 file changed

Lines changed: 27 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
inputs:
66
openwrt_version:
77
description: 'OpenWrt version'
8-
default: '24.10.0'
8+
# Use 25.12-SNAPSHOT for APK and 24.10-SNAPSHOT for IPK
9+
default: '25.12-SNAPSHOT'
910
required: true
1011
type: string
1112

@@ -16,6 +17,7 @@ jobs:
1617
build:
1718
name: ${{ matrix.arch }} build
1819
runs-on: ubuntu-latest
20+
continue-on-error: true
1921
strategy:
2022
matrix:
2123
arch:
@@ -42,6 +44,7 @@ jobs:
4244
## loongarch64-unknown-linux-musl #
4345
- loongarch64_generic # OK
4446
## riscv64gc-unknown-linux-musl ###
47+
- riscv64_generic # OK
4548
- riscv64_riscv64 # OK
4649
## x86_64-unknown-linux-musl ######
4750
- x86_64 # OK
@@ -65,7 +68,7 @@ jobs:
6568
- powerpc_8548 # OK
6669

6770
steps:
68-
- uses: actions/checkout@v4
71+
- uses: actions/checkout@v6
6972
with:
7073
fetch-depth: 0
7174

@@ -79,11 +82,26 @@ jobs:
7982
- name: List outputs
8083
run: |
8184
find bin/packages
85+
86+
# Renaming APK files to include architecture suffix
87+
# e.g., librespot_0.8.0-r1.apk -> librespot_0.8.0-r1_aarch64_cortex-a53.apk
88+
if ls bin/packages/${{ matrix.arch }}/action/*.apk 1> /dev/null 2>&1; then
89+
echo "Processing APK files..."
90+
for apk_file in bin/packages/${{ matrix.arch }}/action/*.apk; do
91+
filename=$(basename "$apk_file")
92+
new_filename="${filename%.apk}_${{ matrix.arch }}.apk"
93+
mv bin/packages/${{ matrix.arch }}/action/"$filename" bin/packages/${{ matrix.arch }}/action/"$new_filename"
94+
done
95+
else
96+
echo "No APK files found"
97+
fi
8298
83-
- uses: actions/upload-artifact@v4
99+
- uses: actions/upload-artifact@v6
84100
with:
85101
name: ls-${{ matrix.arch }}
86-
path: bin/packages/${{ matrix.arch }}/action/*.ipk
102+
path: |
103+
bin/packages/${{ matrix.arch }}/action/*.ipk
104+
bin/packages/${{ matrix.arch }}/action/*.apk
87105
88106
release:
89107

@@ -93,17 +111,17 @@ jobs:
93111

94112
steps:
95113

96-
- uses: actions/download-artifact@v4
114+
- uses: actions/download-artifact@v6
97115
with:
98-
path: ipks
116+
path: artifacts
99117
pattern: ls-*
100118
merge-multiple: true
101119

102120
- name: List outputs
103121
id: list
104122
run: |
105-
find ipks
106-
ls ipks | head -n 1 | awk -F"_" '{ print "usteer-ng_version="$2 }' >> "$GITHUB_OUTPUT"
123+
find artifacts
124+
ls artifacts | head -n 1 | awk -F"_" '{ print "usteer-ng_version="$2 }' >> "$GITHUB_OUTPUT"
107125
108126
- name: Release
109127
uses: softprops/action-gh-release@v1
@@ -113,4 +131,4 @@ jobs:
113131
body: |
114132
usteer-ng v${{ steps.list.outputs.usteer-ng_version }} OpenWrt ${{ github.event.inputs.openwrt_version }} build
115133
files: |
116-
ipks/*
134+
artifacts/*

0 commit comments

Comments
 (0)