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

47 lines
993 B
Markdown

6 years ago
# setup-go
6 years ago
6 years ago
This action sets up a go environment for use in actions by:
6 years ago
6 years ago
- optionally downloading and caching a version of go by version and adding to PATH
- 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:
6 years ago
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:
6 years ago
go: [ '1.8', '1.9.3', '1.10' ]
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:
version: ${{ matrix.go }}
- 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)