small/.github/workflows/Test build.yml

73 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Test Build
on:
workflow_dispatch:
push:
tags:
- v2.**
jobs:
build:
name: build ${{ matrix.arch }}-${{ matrix.sdk }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk:
- 23.05.2
arch:
- aarch64_cortex-a53
- x86_64
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Build
uses: kenzok8/gh-action-sdk@main
env:
ARCH: ${{ matrix.arch }}-${{ matrix.sdk }}
FEEDNAME: packages_ci
PACKAGES: luci-app-passwall luci-app-ssr-plus
NO_REFRESH_CHECK: true
- name: Store packages
uses: actions/upload-artifact@main
with:
name: ${{ matrix.arch }}-${{ matrix.sdk }}
path: bin/packages/${{ matrix.arch }}/packages_ci/*.ipk
- name: Zip packages
run: |
zip -j ${{ matrix.arch }}-${{ matrix.sdk }}.zip bin/packages/${{ matrix.arch }}/packages_ci/*.ipk
echo -e "**文件说明** 🎈:\n" >> release.txt
echo -e "1. 默认ssr与passwall的插件与依赖整合包\n" >> release.txt
echo -e "2. 使用方法将整合包上传到openwrt设备的tmp目录输入命令 \`opkg install *.ipk\`\n" >> release.txt
echo -e "3. 默认压缩包里包含ssr passwall bypass passwall2 插件\n" >> release.txt
echo -e "4. 如果单独安装ssr与依赖\`rm -rf {*passwall*,*bypass*,*vssr*}\`\n" >> release.txt
- name: Upload packages
uses: ncipollo/release-action@main
with:
token: ${{ secrets.ACCESS_TOKEN }}
artifacts: "${{ matrix.arch }}-${{ matrix.sdk }}.zip,bin/packages/${{ matrix.arch }}/packages_ci/*.ipk"
allowUpdates: true
replacesArtifacts: true
bodyFile: "release.txt"
tag: v2.${{ github.run_number }}-${{ matrix.arch }}-${{ matrix.sdk }}
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 0
- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@master
with:
keep_latest: 4
delete_tags: true
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}