From b0bf7b16c3357e8e51b106feb965f65933f68d37 Mon Sep 17 00:00:00 2001 From: itchyny Date: Thu, 16 Jan 2020 19:27:09 +0900 Subject: [PATCH] use add-path for adding $GOPATH/bin to $PATH --- .github/workflows/ci.yaml | 7 +++---- .github/workflows/release.yaml | 10 ++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 493bb1e..fe8f2fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fb15c81..9fa7fa3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 }}