Skip to content

Commit 5e36f9f

Browse files
authored
Merge pull request #28 from fscarmen/master
Cross build WireProxy on Actions
2 parents c1989bf + 91efa2e commit 5e36f9f

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

.github/wireproxy-releaser.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
project_name: Build wireproxy
2+
before:
3+
hooks:
4+
- go mod tidy -v
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
ldflags:
9+
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}}
10+
goos:
11+
- linux
12+
- windows
13+
- darwin
14+
goarch:
15+
- arm
16+
- arm64
17+
- 386
18+
- amd64
19+
- mips
20+
- mipsle
21+
- s390x
22+
- riscv64
23+
gomips:
24+
- softfloat
25+
ignore:
26+
- goos: windows
27+
goarch: arm
28+
- goos: windows
29+
goarch: arm64
30+
main: ./cmd/wireproxy/
31+
binary: wireproxy
32+
universal_binaries:
33+
- name_template: "wireproxy"
34+
replace: false
35+
checksum:
36+
name_template: "checksums.txt"
37+
snapshot:
38+
name_template: "wireproxy"
39+
archives:
40+
- name_template: "wireproxy_{{ .Os }}_{{ .Arch }}"
41+
files:
42+
- none*
43+
changelog:
44+
sort: asc
45+
filters:
46+
exclude:
47+
- "^docs:"
48+
- "^test:"
49+
- "^chore"
50+
- Merge pull request
51+
- Merge branch
52+
- go mod tidy

.github/workflows/wireproxy.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Cross compile WirePorxy
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
WirePorxy:
8+
9+
name: Cross compile WirePorxy
10+
11+
runs-on: ubuntu-20.04
12+
13+
env:
14+
workdir: ./WirePorxy
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@master
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Git clone WirePorxy
23+
run: |
24+
git clone https://github.com/octeep/wireproxy.git ${{ env.workdir }}
25+
cp ./.github/wireproxy-releaser.yml ${{ env.workdir }}/.goreleaser.yml
26+
27+
- name: Set up GoReleaser
28+
uses: actions/setup-go@v2
29+
with:
30+
go-version: "1.17"
31+
32+
- name: Run GoReleaser
33+
uses: goreleaser/goreleaser-action@v2
34+
with:
35+
distribution: goreleaser
36+
workdir: ${{ env.workdir }}
37+
version: latest
38+
args: release --rm-dist
39+
40+
- name: Release binaries
41+
uses: softprops/action-gh-release@v1
42+
with:
43+
tag_name: wireproxy
44+
files: ${{ env.workdir }}/dist/*.tar.gz
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)