You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
setup-go/README.md

51 lines
1.2 KiB
Markdown

6 years ago
# setup-go
6 years ago
5 years ago
<p align="left">
<a href="https://github.com/actions/setup-go"><img alt="GitHub Actions status" src="https://github.com/actions/setup-go/workflows/Main%20workflow/badge.svg"></a>
</p>
6 years ago
This action sets up a go environment for use in actions by:
6 years ago
- optionally downloading and caching a version of Go by version and adding to PATH
6 years ago
- registering problem matchers for error output
# Usage
See [action.yml](action.yml)
Basic:
```yaml
6 years ago
steps:
6 years ago
- uses: actions/checkout@master
6 years ago
- uses: actions/setup-go@v1
6 years ago
with:
go-version: '1.9.3' # The Go version to download (if necessary) and use.
6 years ago
- run: go run hello.go
```
Matrix Testing:
```yaml
jobs:
build:
6 years ago
runs-on: ubuntu-16.04
6 years ago
strategy:
matrix:
go: [ '1.8', '1.9.3', '1.10.x' ]
6 years ago
name: Go ${{ matrix.go }} sample
6 years ago
steps:
6 years ago
- uses: actions/checkout@master
6 years ago
- name: Setup go
6 years ago
uses: actions/setup-go@v1
6 years ago
with:
go-version: ${{ matrix.go }}
6 years ago
- run: go run hello.go
```
6 years ago
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)
# Contributions
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)