From ebb26754a913f8e5719be85c5229ab38292154ab Mon Sep 17 00:00:00 2001 From: fscarmen <62703343+fscarmen@users.noreply.github.com> Date: Tue, 19 Apr 2022 22:09:09 +0800 Subject: [PATCH] Create wireguard-go.yml --- .github/workflows/wireguard-go.yml | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/wireguard-go.yml diff --git a/.github/workflows/wireguard-go.yml b/.github/workflows/wireguard-go.yml new file mode 100644 index 0000000..b8f5952 --- /dev/null +++ b/.github/workflows/wireguard-go.yml @@ -0,0 +1,46 @@ +name: Cross compile WireGuard-go + +on: + workflow_dispatch: + +jobs: + WireGuard-go: + + name: Cross compile WireGuard-go + + runs-on: ubuntu-20.04 + + env: + workdir: ./wireguard-go-source + + steps: + - name: Checkout code + uses: actions/checkout@master + with: + fetch-depth: 0 + + - name: Git clone WireGuard-go + run: | + git clone https://git.zx2c4.com/wireguard-go ${{ env.workdir }} + cp ./.github/wireguard-go-releaser.yml ${{ env.workdir }}/.goreleaser.yml + + - name: Set up GoReleaser + uses: actions/setup-go@v2 + with: + go-version: "1.18" + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + workdir: ${{ env.workdir }} + version: latest + args: release --rm-dist + + - name: Release binaries + uses: softprops/action-gh-release@v1 + with: + tag_name: wireguard-go + files: ${{ env.workdir }}/dist/*.tar.gz + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}