use add-path for adding $GOPATH/bin to $PATH

This commit is contained in:
itchyny 2020-01-16 19:27:09 +09:00
parent b9a4d40943
commit b0bf7b16c3
2 changed files with 7 additions and 10 deletions

View file

@ -15,10 +15,9 @@ jobs:
uses: actions/setup-go@v1
with:
go-version: 1.x
- name: Add $GOPATH/bin to $PATH
run: echo "::add-path::$(go env GOPATH)/bin"
- name: Test
run: make test
- name: Lint
run: |
export PATH=$PATH:$(go env GOPATH)/bin # will be removed
make lint
if: matrix.os != 'windows-latest'
run: make lint

View file

@ -16,10 +16,10 @@ jobs:
uses: actions/setup-go@v1
with:
go-version: 1.x
- name: Add $GOPATH/bin to $PATH
run: echo "::add-path::$(go env GOPATH)/bin"
- name: Cross build
run: |
export PATH=$PATH:$(go env GOPATH)/bin # remove when actions/setup-go does this
make cross
run: make cross
- name: Create Release
id: create_release
uses: actions/create-release@master
@ -29,8 +29,6 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- name: Upload
run: |
export PATH=$PATH:$(go env GOPATH)/bin # remove when actions/setup-go does this
make upload
run: make upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}