Skip to content

Add build for arm64 arch #32

Add build for arm64 arch

Add build for arm64 arch #32

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-22.04
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
id: build
uses: vmactions/freebsd-vm@v1
with:
usesh: true
copyback: true
release: "14.3"
arch: ${{ matrix.arch }}
prepare: |
pkg install -y git go124 ca_root_nss poudriere
git clone -b devel --depth 1 --single-branch https://github.com/pfsense/FreeBSD-ports.git /usr/ports
run: |
set -ex
cd pfSense-pkg-NetBird
make
make package
cd ../netbird
make makesum
make package
- name: Rename pfSense package with arch
run: |
for f in pfSense-pkg-NetBird/work/pkg/pfSense-pkg-NetBird-*.pkg; do
mv "$f" "${f%.pkg}-${{ matrix.arch }}.pkg"
done
- name: Rename FreeBSD package with arch
run: |
for f in netbird/work/pkg/netbird-*.pkg; do
mv "$f" "${f%.pkg}-${{ matrix.arch }}.pkg"
done
- name: Upload pfSense package artifact
uses: actions/upload-artifact@v4
with:
name: pfSense-package-${{ matrix.arch }}
path: pfSense-pkg-NetBird/work/pkg/pfSense-pkg-NetBird-*.pkg
retention-days: 3
- name: Upload FreeBSD package artifact
uses: actions/upload-artifact@v4
with:
name: FreeBSD-package-${{ matrix.arch }}
path: netbird/work/pkg/netbird-*.pkg
retention-days: 3
release_publish:
needs: release
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Create Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Upload packages to release page
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}