QiuSimons / openwrt-mos

GNU General Public License v3.0
229 stars 89 forks source link

根据sbwml大佬的SDK脚本,自动编译IPK #155

Open firkerword opened 1 year ago

firkerword commented 1 year ago

yml脚本:

name Build
on:
  workflow_dispatch:
  repository_dispatch:
    types: go
  push:
    tags:
      - v5.**

jobs:
  build:
    name: Build ${{ matrix.arch }}
    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-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
          - i386_pentium-mmx
          - i386_pentium4
          - mips64_octeonplus
          - mips_24kc
          - mips_4kec
          - mips_mips32
          - mipsel_24kc_24kf
          - mipsel_74kc
          - mipsel_mips32
          - x86_64

    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Building packages
        uses: sbwml/openwrt-gh-action-sdk@go1.20
        env:
          ARCH: ${{ matrix.arch }}-openwrt-21.02
          FEEDNAME: packages_ci
          PACKAGES: luci-app-mosdns
          NO_REFRESH_CHECK: true

      - name: Upload artifacts
        uses: actions/upload-artifact@v3
        with:
          name: ${{ matrix.arch }}
          path: bin/packages/${{ matrix.arch }}/packages_ci/*.ipk

      - name: Upload packages
        uses: ncipollo/release-action@v1
        with:
          token: ${{ secrets.workflow_token }}
          allowUpdates: true
          replacesArtifacts: true
          prerelease: true
          artifacts: "bin/packages/${{ matrix.arch }}/packages_ci/*.ipk"