From e51ea15b394fe381cf87147f1485c3bb3bb792ef Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sat, 13 Feb 2021 15:33:10 +0300 Subject: [PATCH 1/9] Create release.yaml --- .github/workflows/release.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..2a6b889 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +# .github/workflows/release.yaml + +on: + release: + types: [created] + +jobs: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/386, darwin/amd64 + goos: [linux, windows, darwin] + goarch: ["386", amd64] + steps: + - uses: actions/checkout@v2 + - uses: wangyoucao577/go-release-action@v1.14 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + ldflags: '-linkmode external -extldflags "-static" -s -w' + binary_name: "ovenvpn-user" + asset_name: ovenvpn-user-${{ matrix.goos }}-${{ matrix.goarch }}. From e8ad0ce1f4421461eb3ce42c3083a94b52a84ecd Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sat, 13 Feb 2021 15:48:16 +0300 Subject: [PATCH 2/9] Update release.yaml --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2a6b889..eb88eb4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,5 +21,6 @@ jobs: goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} ldflags: '-linkmode external -extldflags "-static" -s -w' + pre_command: apt-get update && apt-get install -y libsqlite3 gcc binary_name: "ovenvpn-user" asset_name: ovenvpn-user-${{ matrix.goos }}-${{ matrix.goarch }}. From e768b8941129215746277e42004634d1f68ebb20 Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sun, 14 Feb 2021 12:26:13 +0300 Subject: [PATCH 3/9] Update release.yaml --- .github/workflows/release.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eb88eb4..e89889b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,13 +14,18 @@ jobs: goos: [linux, windows, darwin] goarch: ["386", amd64] steps: - - uses: actions/checkout@v2 - - uses: wangyoucao577/go-release-action@v1.14 + - name: checkout code + uses: actions/checkout@v2 + - name: Get packages + uses: mstksg/get-package@v1 + with: + apt-get: libsqlite3 gcc + - name: build binaries + uses: wangyoucao577/go-release-action@v1.14 with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} ldflags: '-linkmode external -extldflags "-static" -s -w' - pre_command: apt-get update && apt-get install -y libsqlite3 gcc binary_name: "ovenvpn-user" asset_name: ovenvpn-user-${{ matrix.goos }}-${{ matrix.goarch }}. From f9a9c0079a1f9ceb874c0b8ec2767f2ef3ce341e Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sun, 14 Feb 2021 12:37:41 +0300 Subject: [PATCH 4/9] Update release.yaml --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e89889b..717c9e2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,7 @@ jobs: - name: Get packages uses: mstksg/get-package@v1 with: - apt-get: libsqlite3 gcc + apt-get: sqlite3 gcc - name: build binaries uses: wangyoucao577/go-release-action@v1.14 with: From f819b3a7d126b5ca332bdf78763ffc6421d6ed1a Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sun, 14 Feb 2021 13:10:09 +0300 Subject: [PATCH 5/9] Create install-deps.sh --- install-deps.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 install-deps.sh diff --git a/install-deps.sh b/install-deps.sh new file mode 100644 index 0000000..49d147d --- /dev/null +++ b/install-deps.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e + +apt-get update +apt-get install -y gcc sqlite3 From f668b3a537ceb87f539e658af4cfc85c43051e85 Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sun, 14 Feb 2021 13:11:10 +0300 Subject: [PATCH 6/9] Update release.yaml --- .github/workflows/release.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 717c9e2..e62e628 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,10 +16,6 @@ jobs: steps: - name: checkout code uses: actions/checkout@v2 - - name: Get packages - uses: mstksg/get-package@v1 - with: - apt-get: sqlite3 gcc - name: build binaries uses: wangyoucao577/go-release-action@v1.14 with: @@ -27,5 +23,6 @@ jobs: goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} ldflags: '-linkmode external -extldflags "-static" -s -w' + pre_command: bash ./install-deps.sh binary_name: "ovenvpn-user" asset_name: ovenvpn-user-${{ matrix.goos }}-${{ matrix.goarch }}. From 81d7ec34e81da4ec5f8cebb69f47d8e9417342ea Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sun, 14 Feb 2021 13:16:36 +0300 Subject: [PATCH 7/9] Update install-deps.sh --- install-deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-deps.sh b/install-deps.sh index 49d147d..72333d2 100644 --- a/install-deps.sh +++ b/install-deps.sh @@ -2,4 +2,4 @@ set -e apt-get update -apt-get install -y gcc sqlite3 +apt-get install -y gcc gcc-multilib sqlite3 From cf274db1c73f65eee5d2691cb1be038c551d94b3 Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sun, 14 Feb 2021 13:18:57 +0300 Subject: [PATCH 8/9] Update release.yaml --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e62e628..03b37fc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: strategy: matrix: # build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/386, darwin/amd64 - goos: [linux, windows, darwin] + goos: [linux] goarch: ["386", amd64] steps: - name: checkout code From 25643a2cbed6956b120ac8b79ae4ea316e893924 Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Sun, 14 Feb 2021 13:23:29 +0300 Subject: [PATCH 9/9] Update release.yaml --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 03b37fc..bf43ea4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,5 +24,5 @@ jobs: goarch: ${{ matrix.goarch }} ldflags: '-linkmode external -extldflags "-static" -s -w' pre_command: bash ./install-deps.sh - binary_name: "ovenvpn-user" - asset_name: ovenvpn-user-${{ matrix.goos }}-${{ matrix.goarch }}. + binary_name: "openvpn-user" + asset_name: openvpn-user-${{ matrix.goos }}-${{ matrix.goarch }}.