2021-10-21 06:01:03 -04:00
|
|
|
name: Build and publish binaries (releases only)
|
2021-10-05 11:09:29 -04:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
releases-matrix:
|
|
|
|
name: Release Go Binary
|
|
|
|
runs-on: ubuntu-latest
|
2021-10-15 00:54:24 -04:00
|
|
|
env:
|
|
|
|
CGO_ENABLED: 1
|
2021-10-05 11:09:29 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
goos: [linux]
|
2021-10-21 06:01:03 -04:00
|
|
|
goarch: ["386", "amd64"]
|
2021-10-05 11:09:29 -04:00
|
|
|
steps:
|
|
|
|
- name: checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: build binaries
|
2022-07-21 11:17:53 -04:00
|
|
|
uses: wangyoucao577/go-release-action@v1.28
|
2021-10-05 11:09:29 -04:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2021-11-29 04:57:45 -05:00
|
|
|
goversion: 1.17
|
2021-10-05 11:09:29 -04:00
|
|
|
goos: ${{ matrix.goos }}
|
|
|
|
goarch: ${{ matrix.goarch }}
|
2021-11-29 05:40:05 -05:00
|
|
|
build_command: bash -ex ./build.sh
|
|
|
|
pre_command: bash -ex ./install-deps.sh
|
2021-10-05 11:09:29 -04:00
|
|
|
binary_name: "ovpn-admin"
|
2021-10-21 06:01:03 -04:00
|
|
|
asset_name: ovpn-admin-${{ matrix.goos }}-${{ matrix.goarch }}
|