|
@@ -31,7 +31,7 @@ jobs:
|
|
|
path: release
|
|
|
|
|
|
build-windows:
|
|
|
- name: Build Windows amd64
|
|
|
+ name: Build Windows
|
|
|
runs-on: windows-latest
|
|
|
steps:
|
|
|
- name: Set up Go 1.17
|
|
@@ -45,8 +45,14 @@ jobs:
|
|
|
- name: Build
|
|
|
run: |
|
|
|
echo $Env:GITHUB_REF.Substring(11)
|
|
|
- go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\nebula.exe ./cmd/nebula-service
|
|
|
- go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\nebula-cert.exe ./cmd/nebula-cert
|
|
|
+ mkdir build\windows-amd64
|
|
|
+ $Env:GOARCH = "amd64"
|
|
|
+ go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\windows-amd64\nebula.exe ./cmd/nebula-service
|
|
|
+ go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\windows-amd64\nebula-cert.exe ./cmd/nebula-cert
|
|
|
+ mkdir build\windows-arm64
|
|
|
+ $Env:GOARCH = "arm64"
|
|
|
+ go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\windows-arm64\nebula.exe ./cmd/nebula-service
|
|
|
+ go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\windows-arm64\nebula-cert.exe ./cmd/nebula-cert
|
|
|
mkdir build\dist\windows
|
|
|
mv dist\windows\wintun build\dist\windows\
|
|
|
|
|
@@ -117,7 +123,10 @@ jobs:
|
|
|
- name: Zip Windows
|
|
|
run: |
|
|
|
cd windows-latest
|
|
|
+ cp windows-amd64/* .
|
|
|
zip -r nebula-windows-amd64.zip nebula.exe nebula-cert.exe dist
|
|
|
+ cp windows-arm64/* .
|
|
|
+ zip -r nebula-windows-arm64.zip nebula.exe nebula-cert.exe dist
|
|
|
|
|
|
- name: Create sha256sum
|
|
|
run: |
|
|
@@ -127,9 +136,12 @@ jobs:
|
|
|
cd $dir
|
|
|
if [ "$dir" = windows-latest ]
|
|
|
then
|
|
|
- sha256sum <nebula.exe | sed 's=-$=nebula-windows-amd64.zip/nebula.exe='
|
|
|
- sha256sum <nebula-cert.exe | sed 's=-$=nebula-windows-amd64.zip/nebula-cert.exe='
|
|
|
+ sha256sum <windows-amd64/nebula.exe | sed 's=-$=nebula-windows-amd64.zip/nebula.exe='
|
|
|
+ sha256sum <windows-amd64/nebula-cert.exe | sed 's=-$=nebula-windows-amd64.zip/nebula-cert.exe='
|
|
|
+ sha256sum <windows-arm64/nebula.exe | sed 's=-$=nebula-windows-arm64.zip/nebula.exe='
|
|
|
+ sha256sum <windows-arm64/nebula-cert.exe | sed 's=-$=nebula-windows-arm64.zip/nebula-cert.exe='
|
|
|
sha256sum nebula-windows-amd64.zip
|
|
|
+ sha256sum nebula-windows-arm64.zip
|
|
|
elif [ "$dir" = darwin-latest ]
|
|
|
then
|
|
|
sha256sum <nebula-darwin.zip | sed 's=-$=nebula-darwin.zip='
|
|
@@ -190,6 +202,16 @@ jobs:
|
|
|
asset_name: nebula-windows-amd64.zip
|
|
|
asset_content_type: application/zip
|
|
|
|
|
|
+ - name: Upload windows-arm64
|
|
|
+ uses: actions/[email protected]
|
|
|
+ env:
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+ with:
|
|
|
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
+ asset_path: ./windows-latest/nebula-windows-arm64.zip
|
|
|
+ asset_name: nebula-windows-arm64.zip
|
|
|
+ asset_content_type: application/zip
|
|
|
+
|
|
|
- name: Upload linux-amd64
|
|
|
uses: actions/[email protected]
|
|
|
env:
|