From 5010a639034fdb61c935e5ef151a9f0cbbbe6465 Mon Sep 17 00:00:00 2001 From: fscarmen Date: Thu, 31 Mar 2022 17:08:20 +0800 Subject: [PATCH 1/3] Create wireproxy-releaser.yml --- .github/wireproxy-releaser.yml | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/wireproxy-releaser.yml diff --git a/.github/wireproxy-releaser.yml b/.github/wireproxy-releaser.yml new file mode 100644 index 0000000..0242f6c --- /dev/null +++ b/.github/wireproxy-releaser.yml @@ -0,0 +1,52 @@ +project_name: Build wireproxy +before: + hooks: + - go mod tidy -v +builds: + - env: + - CGO_ENABLED=0 + ldflags: + - -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} + goos: + - linux + - windows + - darwin + goarch: + - arm + - arm64 + - 386 + - amd64 + - mips + - mipsle + - s390x + - riscv64 + gomips: + - softfloat + ignore: + - goos: windows + goarch: arm + - goos: windows + goarch: arm64 + main: ./cmd/wireproxy/ + binary: wireproxy +universal_binaries: + - name_template: "wireproxy" + replace: false +checksum: + name_template: "checksums.txt" +snapshot: + name_template: "wireproxy" +archives: + - name_template: "wireproxy_{{ .Os }}_{{ .Arch }}" + files: + - none* +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + - "^chore" + - Merge pull request + - Merge branch + - go mod tidy From 3b2a9921e617e1f0c8631af3266758f50a951c93 Mon Sep 17 00:00:00 2001 From: fscarmen Date: Thu, 31 Mar 2022 17:09:44 +0800 Subject: [PATCH 2/3] Create wireproxy.yml --- .github/workflows/wireproxy.yml | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/wireproxy.yml diff --git a/.github/workflows/wireproxy.yml b/.github/workflows/wireproxy.yml new file mode 100644 index 0000000..7dab23b --- /dev/null +++ b/.github/workflows/wireproxy.yml @@ -0,0 +1,46 @@ +name: Cross compile WirePorxy + +on: + workflow_dispatch: + +jobs: + WirePorxy: + + name: Cross compile WirePorxy + + runs-on: ubuntu-20.04 + + env: + workdir: ./WirePorxy + + steps: + - name: Checkout code + uses: actions/checkout@master + with: + fetch-depth: 0 + + - name: Git clone WirePorxy + run: | + git clone https://github.com/octeep/wireproxy.git ${{ env.workdir }} + cp ./.github/wireproxy-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: wireproxy + files: ${{ env.workdir }}/dist/*.tar.gz + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} From 011ec4e21dcaac142eba3a63ee0ba4a4ddf07844 Mon Sep 17 00:00:00 2001 From: octeep Date: Thu, 31 Mar 2022 10:26:20 +0100 Subject: [PATCH 3/3] downgrade go to 1.17 --- .github/workflows/wireproxy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wireproxy.yml b/.github/workflows/wireproxy.yml index 7dab23b..e72d6db 100644 --- a/.github/workflows/wireproxy.yml +++ b/.github/workflows/wireproxy.yml @@ -27,7 +27,7 @@ jobs: - name: Set up GoReleaser uses: actions/setup-go@v2 with: - go-version: "1.18" + go-version: "1.17" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 @@ -36,8 +36,8 @@ jobs: workdir: ${{ env.workdir }} version: latest args: release --rm-dist - - - name: Release binaries + + - name: Release binaries uses: softprops/action-gh-release@v1 with: tag_name: wireproxy