mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-30 14:15:13 +08:00
update 2026-05-10 09:48:30
This commit is contained in:
1 parent
95ac96413e
commit
0b362674f1
6244 files changed
+2992248
No files matched your search
+144
@@ -0,0 +1,144 @@
|
||||
name: Build-OpenWrt-EasyTier
|
||||
|
||||
on:
|
||||
#push:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: '请填写发布Releases的版本号(留空不发布)'
|
||||
required: false
|
||||
default: ''
|
||||
text:
|
||||
description: '请填写发布的说明'
|
||||
required: false
|
||||
default: ''
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
TAG: "${{ github.event.inputs.tag }}"
|
||||
TZ: Asia/Shanghai
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{ matrix.arch }}-${{ matrix.sdk }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- aarch64_cortex-a53
|
||||
- aarch64_cortex-a72
|
||||
- aarch64_generic
|
||||
- arm_arm1176jzf-s_vfp
|
||||
- arm_arm926ej-s
|
||||
- arm_cortex-a15_neon-vfpv4
|
||||
- arm_cortex-a5_vfpv4
|
||||
- arm_cortex-a7
|
||||
- arm_cortex-a7_neon-vfpv4
|
||||
- arm_cortex-a8_vfpv3
|
||||
- arm_cortex-a9
|
||||
- arm_cortex-a9_neon
|
||||
- arm_cortex-a9_vfpv3-d16
|
||||
- arm_fa526
|
||||
#- arm_mpcore
|
||||
- arm_xscale
|
||||
- mips_24kc
|
||||
#- mips_4kec
|
||||
- mips_mips32
|
||||
- mipsel_24kc
|
||||
- mipsel_24kc_24kf
|
||||
- mipsel_74kc
|
||||
- mipsel_mips32
|
||||
- x86_64
|
||||
|
||||
sdk:
|
||||
- 22.03.7
|
||||
- SNAPSHOT
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Cache OpenWrt SDK
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: |
|
||||
/opt/openwrt-sdk-${{ matrix.arch }}-${{ matrix.sdk }}
|
||||
dl
|
||||
key: sdk-${{ matrix.arch }}-${{ matrix.sdk }}
|
||||
|
||||
- name: Create i18n uci-defaults file
|
||||
run: |
|
||||
mkdir -p luci-app-easytier/root/etc/uci-defaults
|
||||
cat > luci-app-easytier/root/etc/uci-defaults/luci-i18n-easytier-zh-cn << 'EOF'
|
||||
#!/bin/sh
|
||||
uci -q batch << EOI
|
||||
set luci.languages.zh_cn='简体中文 (Simplified Chinese)'
|
||||
commit luci
|
||||
EOI
|
||||
rm -f /tmp/luci-indexcache /tmp/luci-modulecache/*
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x luci-app-easytier/root/etc/uci-defaults/luci-i18n-easytier-zh-cn
|
||||
|
||||
- name: Building packages
|
||||
uses: openwrt/gh-action-sdk@main
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}-${{ matrix.sdk }}
|
||||
FEEDNAME: packages_ci
|
||||
PACKAGES: easytier easytier-noweb luci-app-easytier
|
||||
#NO_DEFAULT_FEEDS: 1
|
||||
NO_REFRESH_CHECK: 1
|
||||
NO_SHFMT_CHECK: 1
|
||||
MAKEFLAGS: -j$(nproc)
|
||||
V: s
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ matrix.arch }}-${{ matrix.sdk }}
|
||||
path: bin/packages/${{ matrix.arch }}/packages_ci/*
|
||||
|
||||
release:
|
||||
name: Publish Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.tag != '' }}
|
||||
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Prepare release info
|
||||
run: |
|
||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
||||
mkdir -p release
|
||||
for dir in artifacts/*; do
|
||||
name=$(basename "$dir")
|
||||
zip -j "release/EasyTier-${{ env.TAG }}-${name}.zip" "$dir"/*.ipk "$dir"/*.apk 2>/dev/null || true
|
||||
done
|
||||
echo "build_time=$(TZ=UTC-8 date '+%Y年%m月%d日%H:%M:%S' | jq -sRr @uri)" >> $GITHUB_ENV
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
|
||||
> ### 
|
||||
|
||||
- 其中 **`22.03.7`** 里面是ipk安装包 **`SNAPSHOT`** 里面是apk安装包
|
||||
|
||||
- **`*.apk` 是OpenWrt新版的APK包** 对于apk包跳过证书命令
|
||||
`apk add --allow-untrusted luci-app-easytier.apk`
|
||||
|
||||
${{ github.event.inputs.text }}
|
||||
|
||||
tag_name: ${{ env.TAG }}
|
||||
files: release/*.zip
|
||||
|
||||
|
||||
Reference in new issue
Block a user