diff --git a/.github/workflows/wireguard-go.yml b/.github/workflows/wireguard-go.yml index 4c3069a..6802bc1 100644 --- a/.github/workflows/wireguard-go.yml +++ b/.github/workflows/wireguard-go.yml @@ -3,7 +3,7 @@ name: Build Wireguard-go on: push: tags: - - "*" + - "v*" jobs: binaries: @@ -20,34 +20,26 @@ jobs: goos: windows steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@master with: - token: ${{ secrets.GH_TOKEN }} - - - name: Fetch Go version - run: | - GO_VERSION=1.18 - - - name: Build WireGuard-go + fetch-depth: 0 + - uses: actions/setup-go@v2 + with: + go-version: "^1.17.2" + + - name: Git clone WireGuard-go run: | - mkdir -p /opt/release/ - git clone https://git.zx2c4.com/wireguard-go + mkdir -p /opt/release/ + git clone https://git.zx2c4.com/wireguard-go - - name: Setup Go environment - uses: actions/setup-go@v3 - - - uses: wangyoucao577/go-release-action@v1.25 - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 with: - goarch: ${{ matrix.goarch }} - goversion: "latest" + distribution: goreleaser + version: latest + args: release --rm-dist project_path: "./wireguard-go" release_name: "wireguard-go" binary_name: "wireguard-go-${{ matrix.goos }}-${{ matrix.goarch }}" - - - name: Release binaries - uses: softprops/action-gh-release@v1 - with: - files: /opt/release/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}