diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de3b087..898e428 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.18 - name: Build run: | diff --git a/.github/workflows/build_go1.19.yml b/.github/workflows/build_go1.19.yml new file mode 100644 index 0000000..08b84a5 --- /dev/null +++ b/.github/workflows/build_go1.19.yml @@ -0,0 +1,32 @@ +name: Build_Go1.19 + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + + - name: Build + run: | + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_windows_amd64.exe + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_amd64 + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_arm64 + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3.1.0 + with: + name: pty + path: | + pty_windows_amd64.exe + pty_linux_amd64 + pty_linux_arm64 diff --git a/go.mod b/go.mod index 4c8425b..f09500a 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/MCSManager/pty // Lock -go 1.19 +go 1.18 require ( github.com/creack/pty v1.1.18 @@ -11,5 +11,5 @@ require ( require ( github.com/mattn/go-isatty v0.0.14 // indirect - golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect + golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 // indirect ) diff --git a/go.sum b/go.sum index 01190c1..c6db432 100644 --- a/go.sum +++ b/go.sum @@ -7,5 +7,7 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 h1:foEbQz/B0Oz6YIqu/69kfXPYeFQAuuMYFkjaqXzl5Wo= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs= +golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=