Skip to content

Build package

Build package #48

name: Build package
on: [workflow_dispatch]
permissions: write-all
env:
PACKAGE_NAME: airsaned
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Initialize environment
run: |
sudo apt update
sudo apt install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib \
gettext git libncurses5-dev libssl-dev python3-distutils rsync unzip zlib1g-dev \
file wget
- name: Clone repository
run: git clone https://github.com/trinidude4/openwrt -b openwrt-21.02 openwrt
- name: Update feeds
run: cd $GITHUB_WORKSPACE/openwrt && ./scripts/feeds update -a
- name: Install feeds
run: cd $GITHUB_WORKSPACE/openwrt && ./scripts/feeds install -a
- name: Copy config
run: cd $GITHUB_WORKSPACE && cp .config $GITHUB_WORKSPACE/openwrt/.
- name: Make defconfig
run: cd $GITHUB_WORKSPACE/openwrt && make defconfig
- name: Install sdk
run: |
cd $GITHUB_WORKSPACE/openwrt
wget https://downloads.openwrt.org/releases/21.02.7/targets/mvebu/cortexa9/openwrt-sdk-21.02.7-mvebu-cortexa9_gcc-8.4.0_musl_eabi.Linux-x86_64.tar.xz
tar -xhf openwrt-sdk-*.tar.xz
rsync -a openwrt-*-cortexa9_gcc-8.4.0_musl_eabi.Linux-x86_64/* .
- name: Compile package
run: cd $GITHUB_WORKSPACE/openwrt && make -j$(nproc) package/$PACKAGE_NAME/compile V=s
- name: Upload bin directory
uses: actions/upload-artifact@main
with:
name: ${{env.PACKAGE_NAME}}_bin
path: openwrt/bin
- name: Upload files
uses: maggie44/actions/packages/automatic-releases@built-packages
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest-airsaned
prerelease: false
title: Latest airsaned
files: |
openwrt/bin/packages/arm_cortex-a9_vfpv3-d16/custom/*.ipk