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

57 lines
1.4 KiB
Markdown

6 years ago
# setup-go
6 years ago
5 years ago
<p align="left">
<a href="https://github.com/actions/setup-go/actions"><img alt="GitHub Actions status" src="https://github.com/actions/setup-go/workflows/build-test/badge.svg"></a>
<a href="https://github.com/actions/setup-go/actions"><img alt="versions status" src="https://github.com/actions/setup-go/workflows/go-versions/badge.svg"></a>
5 years ago
</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.13', '1.12' ]
6 years ago
name: Go ${{ matrix.go }} sample
6 years ago
steps:
- uses: actions/checkout@v2
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)
## Code of Conduct
:wave: Be nice. See [our code of conduct](CONDUCT)