mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-07 12:44:15 +08:00
update 2026-11-01 17:51:52
This commit is contained in:
1 parent
5256883332
commit
fcc54fef3b
62 files changed
+2921
-3735
No files matched your search
@@ -0,0 +1,70 @@
|
||||
name: build-apk
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
- 'dev-*'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
SDK_DIR: /builder
|
||||
PKG_DIR_NAME: luci-app-adguardhome-tk
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
strategy:
|
||||
matrix:
|
||||
sdk: [x86-64-25.12.6]
|
||||
container:
|
||||
image: ghcr.io/openwrt/sdk:${{ matrix.sdk }}
|
||||
options: --user root
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 缓存依赖源码下载
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ env.SDK_DIR }}/dl
|
||||
key: adguardhome-dl-v2-${{ runner.os }}-${{ matrix.sdk }}-${{ hashFiles('Makefile', '.github/workflows/build-apk.yaml', 'scripts/*.sh') }}
|
||||
restore-keys: |
|
||||
adguardhome-dl-v2-${{ runner.os }}-${{ matrix.sdk }}-
|
||||
|
||||
- name: 准备 SDK
|
||||
run: bash scripts/prepare-sdk.sh
|
||||
|
||||
- name: 构建包
|
||||
run: runuser -u buildbot -- bash scripts/build-apk.sh
|
||||
|
||||
- name: 整理 APK 产物
|
||||
run: bash scripts/collect-apks.sh
|
||||
|
||||
- name: 上传 APK 压缩包
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: adguardhome-apks
|
||||
path: dist/*.apk
|
||||
archive: true
|
||||
if-no-files-found: error
|
||||
|
||||
- name: 发布到 Releases
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
prerelease: ${{ startsWith(github.ref_name, 'dev-') }}
|
||||
make_latest: 'false'
|
||||
fail_on_unmatched_files: true
|
||||
files: dist/*.apk
|
||||
Reference in new issue
Block a user