File tree Expand file tree Collapse file tree 3 files changed +64
-0
lines changed
Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : install-go-test
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ install-go :
12+ runs-on : windows-latest
13+ steps :
14+ - uses : actions/checkout@v6
15+ - name : Install Go
16+ run : ./install-go.sh
17+ shell : bash
Original file line number Diff line number Diff line change @@ -15,6 +15,28 @@ echo Packing...
1515rm -rf nupkg
1616dotnet pack -nologo -v quiet Google.Cloud.EntityFrameworkCore.Spanner -o $PWD /nupkg
1717
18+ # Download and install Go
19+ GO_VERSION=" 1.26.0"
20+ MSI_FILE=" go${GO_VERSION} .windows-amd64.msi"
21+ DOWNLOAD_URL=" https://go.dev/dl/${MSI_FILE} "
22+
23+ echo " Downloading Go ${GO_VERSION} ..."
24+ curl -L -o " $MSI_FILE " " $DOWNLOAD_URL "
25+
26+ echo " Installing Go silently"
27+ # /i = install, /quiet = no UI, /norestart = don't reboot the machine
28+ msiexec.exe //i " $MSI_FILE " //quiet //norestart
29+
30+ echo " Cleaning up installer file..."
31+ rm " $MSI_FILE "
32+ echo " Installation finished."
33+
34+ echo " Updating PATH for the current script session..."
35+ # Use standard Bash export, converting the C:\ path to a Git Bash /c/ path
36+ export PATH=$PATH :/c/Program\ Files/Go/bin
37+ # Verify that Go is installed and works
38+ go version
39+
1840echo Building spanner-ado-net...
1941pushd spanner-ado-net/spanner-ado-net
2042
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ # Download and install Go
6+ GO_VERSION=" 1.26.0"
7+ MSI_FILE=" go${GO_VERSION} .windows-amd64.msi"
8+ DOWNLOAD_URL=" https://go.dev/dl/${MSI_FILE} "
9+
10+ echo " Downloading Go ${GO_VERSION} ..."
11+ curl -L -o " $MSI_FILE " " $DOWNLOAD_URL "
12+
13+ echo " Installing Go silently"
14+ # /i = install, /quiet = no UI, /norestart = don't reboot the machine
15+ msiexec.exe //i " $MSI_FILE " //quiet //norestart
16+
17+ echo " Cleaning up installer file..."
18+ rm " $MSI_FILE "
19+ echo " Installation finished."
20+
21+ echo " Updating PATH for the current script session..."
22+ # Use standard Bash export, converting the C:\ path to a Git Bash /c/ path
23+ export PATH=$PATH :/c/Program\ Files/Go/bin
24+ # Verify that Go is installed and works
25+ go version
You can’t perform that action at this time.
0 commit comments