From 6736b071c5cd729bc2c566da7377c376202960ab Mon Sep 17 00:00:00 2001 From: Surendrajat Date: Sat, 19 Jun 2021 10:04:53 +0530 Subject: [PATCH] CI: fix release version --- .github/workflows/ipinfo.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ipinfo.yml b/.github/workflows/ipinfo.yml index 8e25809..0305d97 100644 --- a/.github/workflows/ipinfo.yml +++ b/.github/workflows/ipinfo.yml @@ -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_*