77 platform : [
88 {os: ubuntu-latest, path: linux-x86_64},
99 {os: macos-latest, path: darwin-x86_64},
10- {os: ubuntu -latest, path: windows-x86_64},
10+ {os: windows -latest, path: windows-x86_64},
1111 ]
1212 runs-on : ${{ matrix.platform.os }}
1313 steps :
14+ - name : Checkout
15+ uses : actions/checkout@v3
1416 - name : Setup
15- uses : actions/setup-go@v1
17+ uses : actions/setup-go@v2
1618 with :
1719 go-version : 1.16.x
18- - name : Checkout
19- uses : actions/checkout@v1
2020 - name : Configure github for private modules
2121 shell : bash
2222 env :
@@ -26,15 +26,29 @@ jobs:
2626 if : matrix.platform.path == 'linux-x86_64' || matrix.platform.path == 'darwin-x86_64'
2727 run : |
2828 go build -o bin/wallet-generator main.go templates.go
29+ - name : Setup MSYS
30+ if : ${{ matrix.platform.path == 'windows-x86_64' }}
31+ uses : msys2/setup-msys2@v2
32+ with :
33+ msystem : mingw64
34+ update : true
35+ install : >
36+ git
37+ base-devel
38+ autoconf-wrapper
39+ autoconf
40+ automake
41+ libtool
42+ mingw-w64-x86_64-toolchain
43+ mingw-w64-x86_64-go
2944 - name : Build for Windows
30- if : matrix.platform.path == 'windows-x86_64'
45+ if : ${{ matrix.platform.path == 'windows-x86_64' }}
46+ shell : msys2 {0}
47+ env :
48+ TOKEN : ${{ secrets.GH_ACCESS_TOKEN }}
3149 run : |
32- sudo apt install build-essential
33- sudo apt install git -y
34- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
35- eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
36- brew install mingw-w64
37- GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-11.2.0 CXX=x86_64-w64-mingw32-gcc-11.2.0 go build -o bin/wallet-generator.exe -buildmode=exe main.go templates.go
50+ git config --global url."https://error2215:${TOKEN}@github.com/core-coin/go-core".insteadOf "https://github.com/core-coin/go-core"
51+ go build -o bin/wallet-generator.exe -buildmode=exe main.go templates.go
3852 - name : Upload
3953 uses : actions/upload-artifact@v2
4054 with :
0 commit comments