mirror of
https://github.com/actions/setup-go.git
synced 2026-04-05 12:19:24 +00:00
Some checks failed
CodeQL analysis / CodeQL analysis (push) Waiting to run
Licensed / Licensed (push) Waiting to run
Basic validation / Basic validation (push) Has been cancelled
Check dist/ / Check dist/ (push) Has been cancelled
Validate 'setup-go' / stable (macos-latest) (push) Has been cancelled
Validate 'setup-go' / stable (macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / stable (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / stable (windows-latest) (push) Has been cancelled
Validate 'setup-go' / oldstable (macos-latest) (push) Has been cancelled
Validate 'setup-go' / oldstable (macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / oldstable (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / oldstable (windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (ubuntu-latest) (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go 1.25 on windows-latest (push) Has been cancelled
Validate 'setup-go' / check-latest (1.20, windows-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.21, macos-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.21, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-go-version (macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-go-version (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-go-version (windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.20.14, macos-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.20.14, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.20.14, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.20.14, windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.21.10, macos-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.21.10, ubuntu-latest) (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go 1.24 on macos-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go 1.24 on ubuntu-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go 1.24 on windows-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go 1.25 on macos-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go arch arm64 on macos-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go 1.25 on ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, macos-latest-large) (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go via env var on macos-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go via env var on ubuntu-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go via env var on windows-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go arch x64 on macos-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go arch x64 on ubuntu-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go with caching on macos-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go with caching on ubuntu-latest (push) Has been cancelled
Validate Microsoft build of Go / Microsoft build of Go with caching on windows-latest (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x32, ubuntu-latest, oldstable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x32, ubuntu-latest, stable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x32, windows-latest, oldstable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x32, windows-latest, stable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x64, macos-latest, oldstable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x64, macos-latest, stable) (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-1 (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x64, macos-latest-large, oldstable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x64, macos-latest-large, stable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x64, ubuntu-latest, oldstable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x64, ubuntu-latest, stable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x64, windows-latest, oldstable) (push) Has been cancelled
Validate 'setup-go' / aliases-arch (x64, windows-latest, stable) (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-2 (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-3 (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-4 (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-5 (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-6 (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-7 (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-8 (push) Has been cancelled
Validate 'setup-go' / go-version-file (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / go-version-file (windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.21.10, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, macos-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-9 (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-10 (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, windows-latest) (push) Has been cancelled
Validate 'setup-go' / Setup local-cache version-11 (push) Has been cancelled
Validate 'setup-go' / check-latest (1.20, macos-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.20, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.20, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.21, windows-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.22, macos-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.22, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.23, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-tool-versions (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-tool-versions (macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-tool-versions (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-tool-versions (windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.21.10, windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, macos-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, macos-latest-large) (push) Has been cancelled
Validate Windows installation / Validate if symlink is created-1 (push) Has been cancelled
Validate Windows installation / Find default go version (push) Has been cancelled
Validate 'setup-go' / check-latest (1.22, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.22, windows-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.23, macos-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.23, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.23, windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-go-version (macos-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.20.14, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.21, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.22, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.23, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, windows-latest) (push) Has been cancelled
Validate Windows installation / Validate if symlink is created (push) Has been cancelled
Validate Windows installation / Validate if hostedtoolcache works as expected (push) Has been cancelled
Validate Windows installation / Validate if symlink is not created for default go (push) Has been cancelled
Validate Windows installation / Validate if symlink is not created for default go-1 (push) Has been cancelled
* feat: add go-download-base-url input for custom Go distributions
Add support for downloading Go from custom sources such as Microsoft Go
(aka.ms). Users can specify a custom download base URL via the
`go-download-base-url` input or the `GO_DOWNLOAD_BASE_URL` environment
variable (input takes precedence).
When a custom URL is provided, the action skips the GitHub-hosted
manifest and attempts to resolve versions from the custom URL's JSON
listing. If the listing is unavailable (as with aka.ms redirect links),
it falls back to constructing the download URL directly from the
version, platform, and architecture.
Usage:
- uses: actions/setup-go@v6
with:
go-version: '1.25'
go-download-base-url: 'https://aka.ms/golang/release/latest'
Changes:
- action.yml: add go-download-base-url optional input
- installer.ts: add getInfoFromDirectDownload() for URL construction
fallback, thread custom URL through getGo/getInfoFromDist/findMatch
- main.ts: read new input and GO_DOWNLOAD_BASE_URL env var
- setup-go.test.ts: add 12 unit tests for custom URL behavior
- microsoft-validation.yml: add E2E workflow testing Microsoft build of Go
across ubuntu/windows/macos with versions 1.24 and 1.25
- README.md: document new input with Microsoft build of Go examples
* run prettier
* fixup PR review
* revert cache-save
* fixup
* handle distinct cache
* skip json for known URL
* fix bug in JSON with custom URL
143 lines
3.7 KiB
YAML
143 lines
3.7 KiB
YAML
name: Validate Microsoft build of Go
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
|
|
jobs:
|
|
microsoft-basic:
|
|
name: 'Microsoft build of Go ${{ matrix.go-version }} on ${{ matrix.os }}'
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
go-version: ['1.25', '1.24']
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup Microsoft build of Go ${{ matrix.go-version }}
|
|
uses: ./
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
go-download-base-url: 'https://aka.ms/golang/release/latest'
|
|
cache: false
|
|
|
|
- name: Verify Go installation
|
|
run: go version
|
|
|
|
- name: Verify Go env
|
|
run: go env
|
|
|
|
- name: Verify Go is functional
|
|
shell: bash
|
|
run: |
|
|
# Create a simple Go program and run it
|
|
mkdir -p /tmp/test-go && cd /tmp/test-go
|
|
cat > main.go << 'EOF'
|
|
package main
|
|
import "fmt"
|
|
func main() {
|
|
fmt.Println("Hello from Microsoft build of Go!")
|
|
}
|
|
EOF
|
|
go run main.go
|
|
|
|
microsoft-env-var:
|
|
name: 'Microsoft build of Go via env var on ${{ matrix.os }}'
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
env:
|
|
GO_DOWNLOAD_BASE_URL: 'https://aka.ms/golang/release/latest'
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup Microsoft build of Go via environment variable
|
|
uses: ./
|
|
with:
|
|
go-version: '1.25'
|
|
cache: false
|
|
|
|
- name: Verify Go installation
|
|
run: go version
|
|
|
|
- name: Verify Go is functional
|
|
shell: bash
|
|
run: |
|
|
mkdir -p /tmp/test-go && cd /tmp/test-go
|
|
cat > main.go << 'EOF'
|
|
package main
|
|
import "fmt"
|
|
func main() {
|
|
fmt.Println("Hello from Microsoft build of Go via env var!")
|
|
}
|
|
EOF
|
|
go run main.go
|
|
|
|
microsoft-architecture:
|
|
name: 'Microsoft build of Go arch ${{ matrix.architecture }} on ${{ matrix.os }}'
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
architecture: [x64]
|
|
include:
|
|
- os: macos-latest
|
|
architecture: arm64
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup Microsoft build of Go with architecture
|
|
uses: ./
|
|
with:
|
|
go-version: '1.25'
|
|
go-download-base-url: 'https://aka.ms/golang/release/latest'
|
|
architecture: ${{ matrix.architecture }}
|
|
cache: false
|
|
|
|
- name: Verify Go installation
|
|
run: go version
|
|
|
|
microsoft-with-cache:
|
|
name: 'Microsoft build of Go with caching on ${{ matrix.os }}'
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup Microsoft build of Go with caching
|
|
uses: ./
|
|
with:
|
|
go-version: '1.25'
|
|
go-download-base-url: 'https://aka.ms/golang/release/latest'
|
|
cache: true
|
|
|
|
- name: Verify Go installation
|
|
run: go version
|
|
|
|
- name: Verify Go is functional
|
|
shell: bash
|
|
run: |
|
|
mkdir -p /tmp/test-go && cd /tmp/test-go
|
|
go mod init test
|
|
cat > main.go << 'EOF'
|
|
package main
|
|
import "fmt"
|
|
func main() {
|
|
fmt.Println("Hello from cached Microsoft build of Go!")
|
|
}
|
|
EOF
|
|
go run main.go
|