Skip to content

Commit fa830ee

Browse files
authored
Add build for arm64 arch (#7)
1 parent 33867e4 commit fa830ee

File tree

1 file changed

+38
-10
lines changed

1 file changed

+38
-10
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ concurrency:
1515
jobs:
1616
release:
1717
runs-on: ubuntu-22.04
18+
strategy:
19+
matrix:
20+
include:
21+
- arch: x86_64
22+
repo_arch: amd64
23+
- arch: aarch64
24+
repo_arch: aarch64
25+
1826
steps:
1927
- name: Checkout
2028
uses: actions/checkout@v4
@@ -25,20 +33,22 @@ jobs:
2533
with:
2634
usesh: true
2735
copyback: true
36+
arch: ${{ matrix.arch }}
2837
release: "15.0"
38+
2939
prepare: |
3040
pkg lock -y pkg
3141
mkdir -p /usr/local/etc/pkg/repos
3242
sh -c 'cat > /usr/local/etc/pkg/repos/FreeBSD.conf <<EOF
3343
FreeBSD: {
34-
url: "pkg+http://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly",
44+
url: "pkg+http://pkg.FreeBSD.org/FreeBSD:14:${{ matrix.repo_arch }}/quarterly",
3545
mirror_type: "srv",
3646
signature_type: "fingerprints",
3747
fingerprints: "/usr/share/keys/pkg",
3848
enabled: yes
3949
}
4050
EOF'
41-
env ABI=FreeBSD:14:amd64 env IGNORE_OSVERSION=yes pkg update
51+
env ABI=FreeBSD:14:${{ matrix.repo_arch }} env IGNORE_OSVERSION=yes pkg update
4252
pkg install -y git go124 ca_root_nss
4353
git clone -b devel --depth 1 --single-branch https://github.com/pfsense/FreeBSD-ports.git /usr/ports
4454
run: |
@@ -50,22 +60,38 @@ jobs:
5060
make makesum
5161
make package
5262
63+
- name: Rename pfSense package with arch
64+
run: |
65+
for f in pfSense-pkg-NetBird/work/pkg/pfSense-pkg-NetBird-*.pkg; do
66+
mv "$f" "${f%.pkg}-${{ matrix.arch }}.pkg"
67+
done
68+
69+
- name: Rename FreeBSD package with arch
70+
run: |
71+
for f in netbird/work/pkg/netbird-*.pkg; do
72+
mv "$f" "${f%.pkg}-${{ matrix.arch }}.pkg"
73+
done
74+
5375
- name: Upload pfSense package artifact
5476
uses: actions/upload-artifact@v4
5577
with:
56-
name: pfSense-package
78+
name: pfSense-package-${{ matrix.arch }}
5779
path: pfSense-pkg-NetBird/work/pkg/pfSense-pkg-NetBird-*.pkg
5880
retention-days: 3
5981

6082
- name: Upload FreeBSD package artifact
6183
uses: actions/upload-artifact@v4
6284
with:
63-
name: FreeBSD-package
85+
name: FreeBSD-package-${{ matrix.arch }}
6486
path: netbird/work/pkg/netbird-*.pkg
6587
retention-days: 3
6688

89+
release_publish:
90+
needs: release
91+
runs-on: ubuntu-22.04
92+
if: startsWith(github.ref, 'refs/tags/')
93+
steps:
6794
- name: Create Release
68-
if: startsWith(github.ref, 'refs/tags/')
6995
uses: actions/create-release@v1
7096
with:
7197
tag_name: ${{ github.ref_name }}
@@ -75,12 +101,14 @@ jobs:
75101
env:
76102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77103

104+
- name: Download all artifacts
105+
uses: actions/download-artifact@v4
106+
with:
107+
path: artifacts
108+
78109
- name: Upload packages to release page
79-
if: startsWith(github.ref, 'refs/tags/')
80110
uses: softprops/action-gh-release@v1
81111
with:
82-
files: |
83-
pfSense-pkg-NetBird/work/pkg/pfSense-pkg-NetBird-*.pkg
84-
netbird/work/pkg/netbird-*.pkg
112+
files: artifacts/**/*
85113
env:
86-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)