This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build the Neighbor Link Firmware | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Build Environment | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y \ | |
curl build-essential libncurses-dev zlib1g-dev \ | |
gawk git gettext libssl-dev xsltproc rsync wget unzip \ | |
python3 python3-distutils jq | |
- name: Build the Firmware | |
run: | | |
cd src | |
bash build.bash ${{ github.ref }} | |
echo "release_version=${{ github.ref }}" >> build/RELEASE_VERSION | |
- name: Upload Build Artifacts as a Single Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${GITHUB_SHA::6} | |
path: src/build/* | |
- name: Attach Artifacts to Release | |
uses: svenstaro/upload-release-action@v2 | |
if: github.event_name == 'release' | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: artifacts/* | |
tag: ${{ github.ref }} | |
file_glob: true |