Skip to content

Commit

Permalink
Updated release.yaml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
マリウス committed Oct 17, 2020
1 parent 5dd0314 commit 27ceca2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- uses: actions/checkout@v2

- name: Setup Go
Expand All @@ -27,7 +31,7 @@ jobs:
golint .
- name: Run build
run: go build -v .
run: go build -v -ldflags "-X github.com/mrusme/zeit/z.VERSION=${{ steps.get_version.outputs.VERSION }}" .

# - name: Run testing
# run: cd test && go test -v
Expand All @@ -39,6 +43,10 @@ jobs:
if: github.event_name == 'push'

steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Check out repository
uses: actions/checkout@v2

Expand Down Expand Up @@ -70,7 +78,7 @@ jobs:
echo ""
echo "=== Building ${GOOS} ${GOARCH} ==="
go build -v .
go build -v -ldflags "-X github.com/mrusme/zeit/z.VERSION=${{ steps.get_version.outputs.VERSION }}" .
tar -czf ./zeit_${GOOS}_${GOARCH}.tar.gz zeit
go clean
Expand Down

0 comments on commit 27ceca2

Please sign in to comment.