commit
116886a660
6 changed files with 45 additions and 6 deletions
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
@ -1,5 +1,4 @@
|
||||||
# .github/workflows/release.yaml
|
name: Build and publish binaries (releases only)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
@ -10,7 +9,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/386, darwin/amd64
|
|
||||||
goos: [linux]
|
goos: [linux]
|
||||||
goarch: ["386", amd64]
|
goarch: ["386", amd64]
|
||||||
steps:
|
steps:
|
||||||
|
|
28
.github/workflows/release_arm.yaml
vendored
Normal file
28
.github/workflows/release_arm.yaml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
name: Build and publish arm binaries (releases only)
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
releases-matrix:
|
||||||
|
name: Release Go Binary
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: 1
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
goos: [linux]
|
||||||
|
goarch: ["arm", "arm64"]
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: build binaries
|
||||||
|
uses: wangyoucao577/go-release-action@v1.20
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
goos: ${{ matrix.goos }}
|
||||||
|
goarch: ${{ matrix.goarch }}
|
||||||
|
build_command: bash ./build_arm.sh
|
||||||
|
pre_command: bash ./install-deps_arm.sh
|
||||||
|
binary_name: "openvpn-user-${{ matrix.goarch }}"
|
||||||
|
asset_name: openvpn-user-${{ matrix.goos }}-${{ matrix.goarch }}.
|
10
build_arm.sh
Executable file
10
build_arm.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ "$GOOS" == "linux" ]]; then
|
||||||
|
if [[ "$GOARCH" == "arm" ]]; then
|
||||||
|
CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -ldflags "-linkmode external -extldflags -static -s -w" -o openvpn-user-arm
|
||||||
|
fi
|
||||||
|
if [[ "$GOARCH" == "arm64" ]]; then
|
||||||
|
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-linkmode external -extldflags -static -s -w" -o openvpn-user-arm64
|
||||||
|
fi
|
||||||
|
fi
|
4
install-deps-arm.sh
Executable file
4
install-deps-arm.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y gcc gcc-multilib sqlite3 libc6-dev-arm64-cross gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y gcc gcc-multilib sqlite3
|
apt-get install -y gcc gcc-multilib sqlite3
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version = "1.0.3-rc.1"
|
version = "1.0.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in a new issue