Skip to content

Commit

Permalink
CI: fix release version
Browse files Browse the repository at this point in the history
  • Loading branch information
Surendrajat committed Jun 19, 2021
1 parent 0af677d commit 6736b07
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ipinfo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,22 @@ jobs:
run: GOOS=linux GOARCH=386 go build -v -o ipinfo_linux_386 .

- name: Build for darwin/amd64
run: GOOS=darwin GOARCH=amd64 go build -v -o ipinfo_darwin_amd64 .
run: GOOS=darwin GOARCH=amd64 go build -v -o ipinfo_macos_amd64 .

- name: Build for windows/amd64
run: GOOS=windows GOARCH=amd64 go build -v -o ipinfo_windows_amd64.exe .

- run: ls -alhrt ipinfo_*

- name: Get release version
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Create Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Continuous Release ${{ github.ref }}
name: ${{ env.RELEASE_VERSION }}
files: ipinfo_*

0 comments on commit 6736b07

Please sign in to comment.