Repository navigation
123 lines (108 loc) · 3.28 KB
/
Copy pathbuild-ipk.yml
File metadata and controls
123 lines (108 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Build ipk for HomeProxy
on:
push:
branches:
- 'master'
- 'dev'
paths:
- 'htdocs/**'
- 'po/**'
- 'root/**'
- 'Makefile'
- '.github/**'
- '!.github/ISSUE_TEMPLATE/**'
pull_request:
branches:
- 'master'
- 'dev'
types:
- opened
- synchronize
- reopened
paths:
- 'htdocs/**'
- 'root/**'
- 'Makefile'
- '.github/**'
- '!.github/ISSUE_TEMPLATE/**'
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source tree
uses: actions/checkout@v6
- name: Checkout apk
uses: actions/checkout@v6
with:
repository: 'alpinelinux/apk-tools'
path: 'apk-tools'
fetch-depth: 0
ref: 'b5a31c0d865342ad80be10d68f1bb3d3ad9b0866'
- name: Checkout po2lmo
uses: actions/checkout@v6
with:
repository: 'openwrt/luci'
path: 'po2lmo'
sparse-checkout: 'modules/luci-base/src'
- name: Setup dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo -E rm -rf /var/lib/man-db/auto-update
sudo -E apt-get update -qq
sudo -E apt-get install -y build-essential curl fakeroot libssl-dev lua5.1 meson ninja-build
pushd apk-tools
meson setup build \
-Db_lto=true \
-Dcompressed-help=false \
-Ddocs=disabled \
-Dhelp=enabled \
-Dlua_version=5.1 \
-Ddefault_library=static \
-Durl_backend=wget \
-Dzstd=false \
-Dpython=disabled \
-Dtests=disabled \
-Dcrypto_backend=openssl
ninja -C build
sudo -E meson install -C build --strip
popd
pushd po2lmo/modules/luci-base/src
make po2lmo
sudo -E install -m0755 -s po2lmo /usr/local/bin/po2lmo
popd
curl -fLO "https://raw.githubusercontent.com/openwrt/openwrt/master/scripts/ipkg-build"
sudo install -m0755 ipkg-build /usr/local/bin/ipkg-build
- name: Build ipk file
run: |
pushd .github
fakeroot bash build-ipk.sh apk "${{ github.event_name }}"
fakeroot bash build-ipk.sh ipk "${{ github.event_name }}"
echo "APK_ASSET_NAME=$(ls *.apk)" >> $GITHUB_ENV
echo "IPK_ASSET_NAME=$(ls *.ipk)" >> $GITHUB_ENV
popd
- name: Publishing APK files to GitHub Artifacts
uses: actions/upload-artifact@v7
if: github.event_name != 'release'
with:
name: ${{ env.APK_ASSET_NAME }}
path: .github/${{ env.APK_ASSET_NAME }}
archive: false
- name: Publishing IPK files to GitHub Artifacts
uses: actions/upload-artifact@v7
if: github.event_name != 'release'
with:
name: ${{ env.IPK_ASSET_NAME }}
path: .github/${{ env.IPK_ASSET_NAME }}
archive: false
- name: Publishing to GitHub Releases
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'release'
with:
repo_token: ${{ github.token }}
file: .github/luci-app-homeproxy_*.*
file_glob: true
tag: ${{ github.ref }}