lnd/.github/actions/setup-go/action.yml

34 lines
889 B
YAML
Raw Normal View History

# A resuable workflow that's used to setup the go enviroment and cache.
name: Setup go enviroment
runs:
using: "composite"
steps:
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v3
with:
go-version: '${{ env.GO_VERSION }}'
- name: go cache
uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ env.GO_VERSION }}-
- name: set GOPATH
shell: bash
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV