Skip to content

Commit 9d2a1fd

Browse files
committed
Update Makefile and release workflow
1 parent 3a1195d commit 9d2a1fd

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16-
build-pfsense-package:
17-
name: Build NetBird Package (FreeBSD)
16+
release:
1817
runs-on: ubuntu-22.04
19-
2018
steps:
2119
- name: Checkout
2220
uses: actions/checkout@v4
@@ -29,7 +27,7 @@ jobs:
2927
copyback: true
3028
release: "15.0"
3129
prepare: |
32-
pkg install -y git go123 go124 ca_root_nss poudriere
30+
pkg install -y git go124 ca_root_nss poudriere
3331
git clone -b devel --depth 1 --single-branch https://github.com/pfsense/FreeBSD-ports.git /usr/ports
3432
run: |
3533
set -ex
@@ -50,6 +48,27 @@ jobs:
5048
- name: Upload FreeBSD package artifact
5149
uses: actions/upload-artifact@v4
5250
with:
53-
name: freebsd-package
51+
name: FreeBSD-package
5452
path: netbird/work/pkg/netbird-*.pkg
55-
retention-days: 3
53+
retention-days: 3
54+
55+
- name: Create Release
56+
if: startsWith(github.ref, 'refs/tags/')
57+
uses: actions/create-release@v1
58+
with:
59+
tag_name: ${{ github.ref_name }}
60+
release_name: Release ${{ github.ref_name }}
61+
draft: false
62+
prerelease: false
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
66+
- name: Upload packages to release page
67+
if: startsWith(github.ref, 'refs/tags/')
68+
uses: softprops/action-gh-release@v1
69+
with:
70+
files: |
71+
pfSense-pkg-NetBird/work/pkg/pfSense-pkg-NetBird-*.pkg
72+
netbird/work/pkg/netbird-*.pkg
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

netbird/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ NOT_FOR_ARCHS_REASON= "no 32-bit builds supported"
1515

1616
RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss
1717

18-
USES= go:1.23,modules
18+
USES= go:modules
1919
USE_RC_SUBR= netbird
2020

2121
GO_MODULE= github.com/netbirdio/netbird
2222
GO_TARGET= ./client:netbird
23-
GO_BUILDFLAGS= -tags freebsd -o ${PORTNAME} -ldflags "\
24-
-s -w -X github.com/netbirdio/netbird/version.version=${PORTVERSION}"
23+
GO_BUILDFLAGS= -tags freebsd -o ${PORTNAME} -ldflags \
24+
"-s -w -X github.com/netbirdio/netbird/version.version=${DISTVERSION}"
2525

26-
WRKSRC= ${WRKDIR}/netbird-${PORTVERSION}
26+
WRKSRC= ${WRKDIR}/netbird-${DISTVERSION}
2727

2828
PLIST_FILES= bin/netbird
2929

30-
.include <bsd.port.mk>
30+
.include <bsd.port.mk>

0 commit comments

Comments
 (0)