Skip to content

Build package

Build package #57

name: Build package
on: [workflow_dispatch]
permissions: write-all
env:
PACKAGE_NAME: airsaned
BUILD_TARGET: 23.05.2
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: |
mv .config .config.bak
git clone https://github.com/trinidude4/openwrt -b openwrt-23.05 openwrt
rsync -a openwrt/* .
- name: Update feeds
run: cd $GITHUB_WORKSPACE && ./scripts/feeds update -a
- name: Install feeds
run: cd $GITHUB_WORKSPACE && ./scripts/feeds install -a
- name: Make defconfig
run: |
mv .config.bak .config
cd $GITHUB_WORKSPACE && make defconfig
- name: Install sdk
run: |
cd $GITHUB_WORKSPACE
wget https://downloads.openwrt.org/releases/$BUILD_TARGET/targets/mvebu/cortexa9/openwrt-sdk-$BUILD_TARGET-mvebu-cortexa9_gcc-12.3.0_musl_eabi.Linux-x86_64.tar.xz
tar -xhf openwrt-sdk-*.tar.xz
rsync -a openwrt-sdk-$BUILD_TARGET-mvebu-cortexa9_gcc-12.3.0_musl_eabi.Linux-x86_64/* .
- name: Compile package
run: cd $GITHUB_WORKSPACE && 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: 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: |
bin/packages/arm_cortex-a9_vfpv3-d16/custom/*.ipk