Skip to content

Commit 721c540

Browse files
committed
update build-ipk.sh
1 parent 26f5694 commit 721c540

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/build_openwrt_ipk.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,14 @@ jobs:
5050
5151
# build ipk
5252
docker run -t --rm -e OPENWRT_BRANCH="${{ matrix.branch }}" -v `pwd`:/src sbilly/openwrt-builder:latest /bin/bash /src/scripts/build_ipk.sh ${{ matrix.branch }}
53+
54+
# Upload release
55+
- name: Upload binaries to release
56+
uses: svenstaro/upload-release-action@v2
57+
with:
58+
repo_token: ${{ secrets.TOKEN }}
59+
file: bin/*.ipk
60+
asset_name: mything
61+
tag: ${{ github.ref }}
62+
overwrite: true
63+
file_glob: true

scripts/build_ipk.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ init_openwrt_link() {
5656
ln -s /src/staging_dir ${WORK_DIR}/openwrt/staging_dir
5757
ln -s /src/build_dir ${WORK_DIR}/openwrt/build_dir
5858
ln -s /src/tmp ${WORK_DIR}/openwrt/tmp
59-
ln -s /src/bin ${WORK_DIR}/openwrt/bin
6059
}
6160

6261
update_install_openwrt_feeds() {
@@ -136,6 +135,13 @@ openwrt_make_netmaker_package() {
136135
}
137136

138137

138+
openwrt_copy_pacage() {
139+
cd ${WORK_DIR}/openwrt/bin/packages/x86_64/netmaker/
140+
141+
find ./ -name "netmaker*.ipk"|xargs -n1 |gawk -F".ipk" -v branch=${1} '{ print "cp "$0" "/src/bin/$1"-"branch".ipk"}' > /tmp/copy.sh
142+
/bin/bash /tmp/copy.sh
143+
}
144+
139145
download_openwrt
140146

141147
change_openwrt_branch ${DEFAULT_OPENWRT_BRANCH}
@@ -156,5 +162,6 @@ openwrt_patch_golang_host ${DEFAULT_OPENWRT_BRANCH}
156162

157163
openwrt_make_netmaker_package
158164

159-
ls -alF ${WORK_DIR}/openwrt/bin/
165+
openwrt_copy_pacage ${DEFAULT_OPENWRT_BRANCH}
160166

167+
ls -alF ${WORK_DIR}/openwrt/bin/ /src/bin

0 commit comments

Comments
 (0)