From 1bff6720fccb3dc9aa54c513c1606891ce35227b Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Wed, 9 Nov 2022 03:59:20 +0530 Subject: [PATCH] chore: install gox --- .github/workflows/release.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 63f68fd..73203de 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,21 +53,12 @@ jobs: run: whereis go - name: Print Go Version run: go version + - name: Install gox + run: go install github.com/mitchellh/gox@latest - name: Set VERSION env run: echo VERSION=$(basename ${GITHUB_REF}) >> ${GITHUB_ENV} - name: Copy .env file run: mv .env.sample .env - - name: Package files for windows - run: | - make clean && \ - CGO_ENABLED=1 GOOS=windows CC=/usr/bin/x86_64-w64-mingw32-gcc make && \ - mv build/server build/server.exe && \ - zip -vr authorizer-${VERSION}-windows-amd64.zip .env app/build build templates dashboard/build - - name: Package files for linux - run: | - make clean && \ - CGO_ENABLED=1 make && \ - tar cvfz authorizer-${VERSION}-linux-amd64.tar.gz .env app/build build templates dashboard/build - name: Build package run: | make clean && \ @@ -75,8 +66,6 @@ jobs: mkdir -p authorizer-${VERSION}-darwin-amd64/build authorizer-${VERSION}-darwin-amd64/app authorizer-${VERSION}-darwin-amd64/templates authorizer-${VERSION}-darwin-amd64/dashboard && cp build/darwin/amd64/server authorizer-${VERSION}-darwin-amd64/build/ && cp .env authorizer-${VERSION}-darwin-amd64/.env && cp -rf app/build authorizer-${VERSION}-darwin-amd64/app/build && cp -rf templates authorizer-${VERSION}-darwin-amd64/templates && cp -rf dashboard/build authorizer-${VERSION}-darwin-amd64/dashboard/build && tar cvfz authorizer-${VERSION}-darwin-amd64.tar.gz authorizer-${VERSION}-darwin-amd64 - name: Upload assets run: | - github-assets-uploader -f authorizer-${VERSION}-windows-amd64.zip -mediatype application/zip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} && \ - github-assets-uploader -f authorizer-${VERSION}-linux-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} github-assets-uploader -f authorizer-${VERSION}-darwin-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} - name: Log in to Docker Hub uses: docker/login-action@v1